[fix]: dark theme issue in FTabBar while using Florid theme
This commit is contained in:
@@ -98,17 +98,6 @@ class AppThemes {
|
||||
side: BorderSide(width: 0, style: BorderStyle.none),
|
||||
),
|
||||
),
|
||||
tabBarTheme: TabBarThemeData(
|
||||
indicator: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
color: ColorScheme.fromSeed(
|
||||
seedColor: kAppColor,
|
||||
brightness: Brightness.light,
|
||||
).primaryContainer,
|
||||
),
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
splashBorderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
filledButtonTheme: FilledButtonThemeData(
|
||||
style: FilledButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
@@ -269,17 +258,6 @@ class AppThemes {
|
||||
chipTheme: ChipThemeData(
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
),
|
||||
tabBarTheme: TabBarThemeData(
|
||||
indicator: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
color: ColorScheme.fromSeed(
|
||||
seedColor: kAppColor,
|
||||
brightness: Brightness.dark,
|
||||
).primaryContainer,
|
||||
),
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
splashBorderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
filledButtonTheme: FilledButtonThemeData(
|
||||
style: FilledButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
||||
@@ -25,10 +25,13 @@ class FTabBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
// Listen so the TabBar updates when the theme style changes.
|
||||
final settings = context.watch<SettingsProvider>();
|
||||
final isFlorid = settings.themeStyle == ThemeStyle.florid;
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
|
||||
final indicator = isFlorid
|
||||
? BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surfaceBright,
|
||||
color: isDark
|
||||
? Theme.of(context).colorScheme.surfaceContainer
|
||||
: Theme.of(context).colorScheme.surfaceBright,
|
||||
borderRadius: BorderRadius.circular(99),
|
||||
)
|
||||
: null;
|
||||
|
||||
Reference in New Issue
Block a user