diff --git a/packages/flutter/lib/src/material/bottom_navigation_bar.dart b/packages/flutter/lib/src/material/bottom_navigation_bar.dart index 5046fa34aa..7ab9acdff9 100644 --- a/packages/flutter/lib/src/material/bottom_navigation_bar.dart +++ b/packages/flutter/lib/src/material/bottom_navigation_bar.dart @@ -778,7 +778,7 @@ class _BottomNavigationBarState extends State with TickerPr // If the given [TextStyle] has a non-null `fontSize`, it should be used. // Otherwise, the [selectedFontSize] parameter should be used. static TextStyle _effectiveTextStyle(TextStyle textStyle, double fontSize) { - textStyle ??= const TextStyle(inherit: false); + textStyle ??= const TextStyle(); // Prefer the font size on textStyle if present. return textStyle.fontSize == null ? textStyle.copyWith(fontSize: fontSize) : textStyle; } diff --git a/packages/flutter/test/material/bottom_navigation_bar_test.dart b/packages/flutter/test/material/bottom_navigation_bar_test.dart index a17635c317..1f256cd68d 100644 --- a/packages/flutter/test/material/bottom_navigation_bar_test.dart +++ b/packages/flutter/test/material/bottom_navigation_bar_test.dart @@ -106,10 +106,10 @@ void main() { final TextStyle unselectedIcon = _iconStyle(tester, Icons.access_alarm); expect(selectedFontStyle.color, equals(primaryColor)); expect(selectedFontStyle.fontSize, selectedFontSize); - expect(selectedFontStyle.fontWeight, isNull); + expect(selectedFontStyle.fontWeight, equals(FontWeight.w400)); expect(selectedFontStyle.height, isNull); expect(unselectedFontStyle.color, equals(captionColor)); - expect(unselectedFontStyle.fontWeight, isNull); + expect(unselectedFontStyle.fontWeight, equals(FontWeight.w400)); expect(unselectedFontStyle.height, isNull); // Unselected label has a font size of 14 but is scaled down to be font size 12. expect(