diff --git a/lib/src/platform_tab_view.dart b/lib/src/platform_tab_view.dart index 1ea8212..bc9e0ac 100644 --- a/lib/src/platform_tab_view.dart +++ b/lib/src/platform_tab_view.dart @@ -32,7 +32,10 @@ class PlatformTab { Theme.of(context).colorScheme.primary : color ?? Theme.of(context).tabBarTheme.unselectedLabelColor; + final tabTheme = TabBarTheme.of(context); + return Tab( + height: 45, icon: IconTheme( data: IconThemeData(color: theColor), child: icon, @@ -40,7 +43,9 @@ class PlatformTab { child: Text( label, style: (labelStyle ?? - Theme.of(context).textTheme.labelMedium ?? + (active + ? tabTheme.labelStyle + : tabTheme.unselectedLabelStyle) ?? const TextStyle()) .copyWith(color: theColor), ), @@ -190,10 +195,12 @@ class PlatformTabView extends StatefulWidget { final Map body; final PlatformProperty? placement; final bool isNavigational; + final bool androidIsScrollable; const PlatformTabView({ required this.body, this.controller, + this.androidIsScrollable = false, this.placement = const PlatformProperty( android: PlatformTabbarPlacement.bottom, ios: PlatformTabbarPlacement.bottom, @@ -248,6 +255,7 @@ class _PlatformTabViewState extends State Widget android(BuildContext context) { final tabbar = TabBar( controller: controller.android, + isScrollable: widget.androidIsScrollable, tabs: widget.body.keys .mapIndexed((i, e) => e.android(context, currentIndex == i)) .toList(),