From 2dc26ba98682e0a88fa00baa825dd191e8477376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drago=C8=99=20Tiselice?= Date: Thu, 22 Sep 2016 15:03:34 -0700 Subject: [PATCH] Changed BottomNavigationBar to handle dark theme. (#6006) Changed the fixed type to better support the dark theme. --- .../flutter/lib/src/material/bottom_navigation_bar.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/material/bottom_navigation_bar.dart b/packages/flutter/lib/src/material/bottom_navigation_bar.dart index a66e40ef46..59cab1c154 100644 --- a/packages/flutter/lib/src/material/bottom_navigation_bar.dart +++ b/packages/flutter/lib/src/material/bottom_navigation_bar.dart @@ -17,6 +17,7 @@ import 'icon_theme_data.dart'; import 'ink_well.dart'; import 'material.dart'; import 'theme.dart'; +import 'typography.dart'; const double _kActiveMaxWidth = 168.0; const double _kInactiveMaxWidth = 96.0; @@ -302,9 +303,13 @@ class BottomNavigationBarState extends State { case BottomNavigationBarType.fixed: final List children = []; final ThemeData themeData = Theme.of(context); + final TextTheme textTheme = themeData.textTheme; final ColorTween colorTween = new ColorTween( - begin: Colors.black54, - end: config.fixedColor ?? themeData.primaryColor + begin: textTheme.caption.color, + end: config.fixedColor ?? ( + themeData.brightness == Brightness.light ? + themeData.primaryColor : themeData.accentColor + ) ); for (int i = 0; i < config.labels.length; i += 1) {