mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
add tabbar theme extension to fix theme update failure after overlay
added Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -155,7 +155,7 @@ class MyTheme {
|
||||
brightness: Brightness.light,
|
||||
primarySwatch: Colors.blue,
|
||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||
tabBarTheme: TabBarTheme(
|
||||
tabBarTheme: const TabBarTheme(
|
||||
labelColor: Colors.black87,
|
||||
),
|
||||
splashColor: Colors.transparent,
|
||||
@@ -163,13 +163,14 @@ class MyTheme {
|
||||
).copyWith(
|
||||
extensions: <ThemeExtension<dynamic>>[
|
||||
ColorThemeExtension.light,
|
||||
TabbarTheme.light,
|
||||
],
|
||||
);
|
||||
static ThemeData darkTheme = ThemeData(
|
||||
brightness: Brightness.dark,
|
||||
primarySwatch: Colors.blue,
|
||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||
tabBarTheme: TabBarTheme(
|
||||
tabBarTheme: const TabBarTheme(
|
||||
labelColor: Colors.white70,
|
||||
),
|
||||
splashColor: Colors.transparent,
|
||||
@@ -177,12 +178,17 @@ class MyTheme {
|
||||
).copyWith(
|
||||
extensions: <ThemeExtension<dynamic>>[
|
||||
ColorThemeExtension.dark,
|
||||
TabbarTheme.dark,
|
||||
],
|
||||
);
|
||||
|
||||
static ColorThemeExtension color(BuildContext context) {
|
||||
return Theme.of(context).extension<ColorThemeExtension>()!;
|
||||
}
|
||||
|
||||
static TabbarTheme tabbar(BuildContext context) {
|
||||
return Theme.of(context).extension<TabbarTheme>()!;
|
||||
}
|
||||
}
|
||||
|
||||
bool isDarkTheme() {
|
||||
|
||||
Reference in New Issue
Block a user