mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
other
This commit is contained in:
@@ -9,12 +9,12 @@ const Color _primaryColor = Color(0xFF299343);
|
||||
class ThemeViewModel extends ChangeNotifier {
|
||||
ThemeData currentTheme = lightTheme;
|
||||
|
||||
ThemeColors themeColor = LightartThemeColors();
|
||||
ThemeColors themeColor = LightThemeColors();
|
||||
|
||||
void changeTheme() {
|
||||
if (currentTheme == darkTheme) {
|
||||
currentTheme = lightTheme;
|
||||
themeColor = LightartThemeColors();
|
||||
themeColor = LightThemeColors();
|
||||
} else {
|
||||
currentTheme = darkTheme;
|
||||
themeColor = DartThemeColors();
|
||||
@@ -46,12 +46,17 @@ ThemeData darkTheme = ThemeData.dark().copyWith(
|
||||
labelColor: Color(0xffffffff),
|
||||
unselectedLabelColor: Color(0xff999999),
|
||||
),
|
||||
colorScheme: const ColorScheme.light(secondary: _primaryColor,primary: _primaryColor,),
|
||||
colorScheme: const ColorScheme.light(
|
||||
secondary: _primaryColor,
|
||||
primary: _primaryColor,
|
||||
),
|
||||
);
|
||||
ThemeData lightTheme = ThemeData.light().copyWith(
|
||||
primaryColor: _primaryColor,
|
||||
|
||||
colorScheme: const ColorScheme.light(secondary: _primaryColor,primary: _primaryColor,),
|
||||
colorScheme: const ColorScheme.light(
|
||||
secondary: _primaryColor,
|
||||
primary: _primaryColor,
|
||||
),
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
inputDecorationTheme: const InputDecorationTheme(
|
||||
labelStyle: TextStyle(color: _primaryColor),
|
||||
@@ -93,14 +98,14 @@ abstract class ThemeColors {
|
||||
|
||||
Color descColor();
|
||||
|
||||
Color searchBarBg();
|
||||
Color backGround();
|
||||
|
||||
Color pinColor();
|
||||
|
||||
Map<String, TextStyle> codeEditorTheme();
|
||||
}
|
||||
|
||||
class LightartThemeColors extends ThemeColors {
|
||||
class LightThemeColors extends ThemeColors {
|
||||
@override
|
||||
Color taskTitleColor() {
|
||||
return Color(0xff333333);
|
||||
@@ -125,6 +130,11 @@ class LightartThemeColors extends ThemeColors {
|
||||
Color descColor() {
|
||||
return Color(0xff999999);
|
||||
}
|
||||
|
||||
@override
|
||||
Color backGround() {
|
||||
return Color(0xffF5F5F5);
|
||||
}
|
||||
}
|
||||
|
||||
class DartThemeColors extends ThemeColors {
|
||||
@@ -152,4 +162,9 @@ class DartThemeColors extends ThemeColors {
|
||||
Color descColor() {
|
||||
return Color(0xff999999);
|
||||
}
|
||||
|
||||
@override
|
||||
Color backGround() {
|
||||
return Colors.black;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user