Unverified Commit f835839f authored by Hans Muller's avatar Hans Muller Committed by GitHub

Removed BottomNavigationBar accentColor dependency (#76810)

parent b300efcd
......@@ -57,7 +57,9 @@ enum BottomNavigationBarType {
/// * [BottomNavigationBarType.fixed], the default when there are less than
/// four [items]. The selected item is rendered with the
/// [selectedItemColor] if it's non-null, otherwise the theme's
/// [ThemeData.primaryColor] is used. If [backgroundColor] is null, The
/// [ColorScheme.primary] color is used for [Brightness.light] themes
/// and [ColorScheme.secondary] for [Brightness.dark] themes.
/// If [backgroundColor] is null, The
/// navigation bar's background color defaults to the [Material] background
/// color, [ThemeData.canvasColor] (essentially opaque white).
/// * [BottomNavigationBarType.shifting], the default when there are four
......@@ -939,10 +941,10 @@ class _BottomNavigationBarState extends State<BottomNavigationBar> with TickerPr
final Color themeColor;
switch (themeData.brightness) {
case Brightness.light:
themeColor = themeData.primaryColor;
themeColor = themeData.colorScheme.primary;
break;
case Brightness.dark:
themeColor = themeData.accentColor;
themeColor = themeData.colorScheme.secondary;
break;
}
......
......@@ -76,8 +76,8 @@ void main() {
await tester.pumpWidget(
MaterialApp(
theme: ThemeData(
primaryColor: primaryColor,
theme: ThemeData.light().copyWith(
colorScheme: const ColorScheme.light().copyWith(primary: primaryColor),
unselectedWidgetColor: unselectedWidgetColor,
),
home: Scaffold(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment