From c122e5f3f33eea26429a66151e89818483ea448d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl?= Date: Sat, 15 Mar 2025 16:16:53 +0100 Subject: [PATCH] Fix: type 'TextStyle' is not a subtype of type 'Color?' in type cast --- .../style_3_bottom_nav_bar.widget.dart | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/nav_bar_styles/style_3_bottom_nav_bar.widget.dart b/lib/nav_bar_styles/style_3_bottom_nav_bar.widget.dart index 046d059c..3cf529c4 100644 --- a/lib/nav_bar_styles/style_3_bottom_nav_bar.widget.dart +++ b/lib/nav_bar_styles/style_3_bottom_nav_bar.widget.dart @@ -48,19 +48,13 @@ class _BottomNavStyle3 extends StatelessWidget { type: MaterialType.transparency, child: DefaultTextStyle.merge( style: TextStyle( - color: item.textStyle != null - ? item.textStyle!.apply( - color: isSelected - ? (item.activeColorSecondary ?? - item.activeColorPrimary) - : item.inactiveColorPrimary) - as Color? - : isSelected + color: isSelected ? (item.activeColorSecondary ?? item.activeColorPrimary) : item.inactiveColorPrimary, fontWeight: FontWeight.w400, - fontSize: 12), + fontFamily: item.textStyle != null && item.textStyle!.fontFamily != null ? item.textStyle!.fontFamily : null, + fontSize: item.textStyle != null && item.textStyle!.fontSize != null ? item.textStyle!.fontSize : 12), child: FittedBox(child: Text(item.title!)), ), ),