mirror of
https://github.com/mdanics/fluttergram.git
synced 2025-08-06 13:19:53 +08:00
improved BottomNavigationBar's looks by using CupertinoTabBar
This commit is contained in:
@ -1,6 +1,13 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [1.2.1] - 2018-11-04
|
||||
### Changes
|
||||
- Changed `BottomNavigationBar` to `CupertinoTabBar` to remove empty space underneath icons
|
||||
- Added highlighting for the active page on the `CupertinoTabBar`
|
||||
|
||||
|
||||
|
||||
## [1.2.0] - 2018-10-26
|
||||
### Changes
|
||||
- Added push notifications with Cloud Functions (Android)
|
||||
|
@ -27,7 +27,7 @@ android {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 27
|
||||
versionCode 1
|
||||
versionName "1.2"
|
||||
versionName "1.2.1"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
BIN
app-release.apk
BIN
app-release.apk
Binary file not shown.
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'feed.dart';
|
||||
import 'upload_page.dart';
|
||||
import 'dart:async';
|
||||
@ -239,32 +240,32 @@ class _HomePageState extends State<HomePage> {
|
||||
physics: new NeverScrollableScrollPhysics(),
|
||||
onPageChanged: onPageChanged,
|
||||
),
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
bottomNavigationBar: new CupertinoTabBar(
|
||||
activeColor: Colors.orange,
|
||||
items: <BottomNavigationBarItem>[
|
||||
new BottomNavigationBarItem(
|
||||
icon: new Icon(Icons.home, color: Colors.grey),
|
||||
title: new Container(),
|
||||
icon: new Icon(Icons.home, color: (_page == 0) ? Colors.black : Colors.grey),
|
||||
title: new Container(height: 0.0),
|
||||
backgroundColor: Colors.white),
|
||||
new BottomNavigationBarItem(
|
||||
icon: new Icon(Icons.search, color: Colors.grey),
|
||||
title: new Container(),
|
||||
icon: new Icon(Icons.search, color: (_page == 1) ? Colors.black : Colors.grey),
|
||||
title: new Container(height: 0.0),
|
||||
backgroundColor: Colors.white),
|
||||
new BottomNavigationBarItem(
|
||||
icon: new Icon(Icons.add_circle, color: Colors.grey),
|
||||
title: new Container(),
|
||||
icon: new Icon(Icons.add_circle, color: (_page == 2) ? Colors.black : Colors.grey),
|
||||
title: new Container(height: 0.0),
|
||||
backgroundColor: Colors.white),
|
||||
new BottomNavigationBarItem(
|
||||
icon: new Icon(Icons.star, color: Colors.grey),
|
||||
title: new Container(),
|
||||
icon: new Icon(Icons.star, color: (_page == 3) ? Colors.black : Colors.grey),
|
||||
title: new Container(height: 0.0),
|
||||
backgroundColor: Colors.white),
|
||||
new BottomNavigationBarItem(
|
||||
icon: new Icon(Icons.person_outline, color: Colors.grey),
|
||||
title: new Container(),
|
||||
icon: new Icon(Icons.person, color: (_page == 4) ? Colors.black : Colors.grey),
|
||||
title: new Container(height: 0.0),
|
||||
backgroundColor: Colors.white),
|
||||
],
|
||||
onTap: navigationTapped,
|
||||
currentIndex: _page,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user