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
|
# Changelog
|
||||||
All notable changes to this project will be documented in this file.
|
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
|
## [1.2.0] - 2018-10-26
|
||||||
### Changes
|
### Changes
|
||||||
- Added push notifications with Cloud Functions (Android)
|
- Added push notifications with Cloud Functions (Android)
|
||||||
|
@ -27,7 +27,7 @@ android {
|
|||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 27
|
targetSdkVersion 27
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.2"
|
versionName "1.2.1"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
multiDexEnabled true
|
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/material.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'feed.dart';
|
import 'feed.dart';
|
||||||
import 'upload_page.dart';
|
import 'upload_page.dart';
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
@ -239,32 +240,32 @@ class _HomePageState extends State<HomePage> {
|
|||||||
physics: new NeverScrollableScrollPhysics(),
|
physics: new NeverScrollableScrollPhysics(),
|
||||||
onPageChanged: onPageChanged,
|
onPageChanged: onPageChanged,
|
||||||
),
|
),
|
||||||
bottomNavigationBar: new BottomNavigationBar(
|
bottomNavigationBar: new CupertinoTabBar(
|
||||||
|
activeColor: Colors.orange,
|
||||||
items: <BottomNavigationBarItem>[
|
items: <BottomNavigationBarItem>[
|
||||||
new BottomNavigationBarItem(
|
new BottomNavigationBarItem(
|
||||||
icon: new Icon(Icons.home, color: Colors.grey),
|
icon: new Icon(Icons.home, color: (_page == 0) ? Colors.black : Colors.grey),
|
||||||
title: new Container(),
|
title: new Container(height: 0.0),
|
||||||
backgroundColor: Colors.white),
|
backgroundColor: Colors.white),
|
||||||
new BottomNavigationBarItem(
|
new BottomNavigationBarItem(
|
||||||
icon: new Icon(Icons.search, color: Colors.grey),
|
icon: new Icon(Icons.search, color: (_page == 1) ? Colors.black : Colors.grey),
|
||||||
title: new Container(),
|
title: new Container(height: 0.0),
|
||||||
backgroundColor: Colors.white),
|
backgroundColor: Colors.white),
|
||||||
new BottomNavigationBarItem(
|
new BottomNavigationBarItem(
|
||||||
icon: new Icon(Icons.add_circle, color: Colors.grey),
|
icon: new Icon(Icons.add_circle, color: (_page == 2) ? Colors.black : Colors.grey),
|
||||||
title: new Container(),
|
title: new Container(height: 0.0),
|
||||||
backgroundColor: Colors.white),
|
backgroundColor: Colors.white),
|
||||||
new BottomNavigationBarItem(
|
new BottomNavigationBarItem(
|
||||||
icon: new Icon(Icons.star, color: Colors.grey),
|
icon: new Icon(Icons.star, color: (_page == 3) ? Colors.black : Colors.grey),
|
||||||
title: new Container(),
|
title: new Container(height: 0.0),
|
||||||
backgroundColor: Colors.white),
|
backgroundColor: Colors.white),
|
||||||
new BottomNavigationBarItem(
|
new BottomNavigationBarItem(
|
||||||
icon: new Icon(Icons.person_outline, color: Colors.grey),
|
icon: new Icon(Icons.person, color: (_page == 4) ? Colors.black : Colors.grey),
|
||||||
title: new Container(),
|
title: new Container(height: 0.0),
|
||||||
backgroundColor: Colors.white),
|
backgroundColor: Colors.white),
|
||||||
],
|
],
|
||||||
onTap: navigationTapped,
|
onTap: navigationTapped,
|
||||||
currentIndex: _page,
|
currentIndex: _page,
|
||||||
type: BottomNavigationBarType.fixed,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user