[fix]: dark theme issue in FTabBar while using Florid theme

This commit is contained in:
nahnah
2026-01-27 22:40:03 +00:00
parent 4fbfbd447d
commit 0a3ff7b6af
2 changed files with 4 additions and 23 deletions
-22
View File
@@ -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(
+4 -1
View File
@@ -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;