mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 20:30:35 +00:00
Improved non dynamic theme
This commit is contained in:
parent
386af8e809
commit
1f0f158251
40 changed files with 118 additions and 277 deletions
|
@ -157,13 +157,7 @@ ThemeData darkTheme(ColorScheme? dynamicColorScheme) => ThemeData(
|
|||
|
||||
ThemeData lightThemeOldVersions(MaterialColor primaryColor) => ThemeData(
|
||||
useMaterial3: true,
|
||||
primaryColor: primaryColor,
|
||||
appBarTheme: AppBarTheme(
|
||||
color: Colors.white,
|
||||
foregroundColor: Colors.black,
|
||||
elevation: 0,
|
||||
surfaceTintColor: primaryColor
|
||||
),
|
||||
colorSchemeSeed: primaryColor,
|
||||
snackBarTheme: SnackBarThemeData(
|
||||
behavior: SnackBarBehavior.floating,
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -171,107 +165,18 @@ ThemeData lightThemeOldVersions(MaterialColor primaryColor) => ThemeData(
|
|||
),
|
||||
elevation: 4,
|
||||
),
|
||||
brightness: Brightness.light,
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
dialogBackgroundColor: Colors.white,
|
||||
textTheme: const TextTheme(
|
||||
bodyText1: TextStyle(
|
||||
color: Colors.black54
|
||||
),
|
||||
bodyText2: TextStyle(
|
||||
color: Colors.black
|
||||
),
|
||||
),
|
||||
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
||||
foregroundColor: Colors.white,
|
||||
backgroundColor: primaryColor
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: ButtonStyle(
|
||||
foregroundColor: MaterialStateProperty.all(primaryColor),
|
||||
overlayColor: MaterialStateProperty.all(primaryColor.withOpacity(0.1))
|
||||
),
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ButtonStyle(
|
||||
foregroundColor: MaterialStateProperty.all(primaryColor),
|
||||
surfaceTintColor: MaterialStateProperty.all(primaryColor),
|
||||
overlayColor: MaterialStateProperty.all(primaryColor.shade50),
|
||||
)
|
||||
),
|
||||
cardTheme: CardTheme(
|
||||
surfaceTintColor: primaryColor
|
||||
),
|
||||
navigationBarTheme: NavigationBarThemeData(
|
||||
surfaceTintColor: primaryColor,
|
||||
indicatorColor: primaryColor
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
floatingLabelStyle: TextStyle(
|
||||
color: primaryColor
|
||||
),
|
||||
iconColor: Colors.grey,
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
borderSide: BorderSide(
|
||||
color: primaryColor,
|
||||
width: 2
|
||||
)
|
||||
)
|
||||
),
|
||||
textSelectionTheme: TextSelectionThemeData(
|
||||
cursorColor: primaryColor
|
||||
),
|
||||
dividerColor: Colors.black12,
|
||||
listTileTheme: const ListTileThemeData(
|
||||
tileColor: Colors.transparent,
|
||||
textColor: Color.fromRGBO(117, 117, 117, 1),
|
||||
iconColor: Color.fromRGBO(117, 117, 117, 1),
|
||||
),
|
||||
checkboxTheme: CheckboxThemeData(
|
||||
checkColor: MaterialStateProperty.all(Colors.white),
|
||||
fillColor: MaterialStateProperty.all(primaryColor),
|
||||
),
|
||||
tabBarTheme: TabBarTheme(
|
||||
unselectedLabelColor: Colors.black,
|
||||
labelColor: primaryColor,
|
||||
indicator: UnderlineTabIndicator(
|
||||
borderSide: BorderSide(
|
||||
color: primaryColor,
|
||||
width: 2
|
||||
)
|
||||
)
|
||||
),
|
||||
progressIndicatorTheme: ProgressIndicatorThemeData(
|
||||
color: primaryColor
|
||||
),
|
||||
indicatorColor: primaryColor,
|
||||
radioTheme: RadioThemeData(
|
||||
fillColor: MaterialStateProperty.all(primaryColor),
|
||||
),
|
||||
androidOverscrollIndicator: AndroidOverscrollIndicator.stretch,
|
||||
brightness: Brightness.light,
|
||||
androidOverscrollIndicator: AndroidOverscrollIndicator.stretch
|
||||
);
|
||||
|
||||
ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData(
|
||||
useMaterial3: true,
|
||||
primaryColor: primaryColor,
|
||||
scaffoldBackgroundColor: const Color.fromRGBO(18, 18, 18, 1),
|
||||
navigationBarTheme: NavigationBarThemeData(
|
||||
indicatorColor: primaryColor,
|
||||
surfaceTintColor: primaryColor
|
||||
),
|
||||
dialogTheme: DialogTheme(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(30)
|
||||
)
|
||||
),
|
||||
appBarTheme: AppBarTheme(
|
||||
color: const Color.fromRGBO(18, 18, 18, 1),
|
||||
foregroundColor: Colors.white,
|
||||
elevation: 0,
|
||||
surfaceTintColor: primaryColor
|
||||
),
|
||||
dialogBackgroundColor: const Color.fromRGBO(44, 44, 44, 1),
|
||||
colorSchemeSeed: primaryColor,
|
||||
snackBarTheme: SnackBarThemeData(
|
||||
contentTextStyle: const TextStyle(
|
||||
color: Colors.white
|
||||
|
@ -282,76 +187,11 @@ ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData(
|
|||
),
|
||||
elevation: 4,
|
||||
),
|
||||
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
||||
foregroundColor: Colors.white,
|
||||
backgroundColor: primaryColor
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: ButtonStyle(
|
||||
foregroundColor: MaterialStateProperty.all(primaryColor),
|
||||
overlayColor: MaterialStateProperty.all(primaryColor.withOpacity(0.1))
|
||||
),
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ButtonStyle(
|
||||
foregroundColor: MaterialStateProperty.all(primaryColor),
|
||||
surfaceTintColor: MaterialStateProperty.all(primaryColor),
|
||||
overlayColor: MaterialStateProperty.all(primaryColor.shade50),
|
||||
)
|
||||
),
|
||||
cardTheme: CardTheme(
|
||||
surfaceTintColor: primaryColor
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
floatingLabelStyle: TextStyle(
|
||||
color: primaryColor
|
||||
),
|
||||
iconColor: Colors.grey,
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
borderSide: BorderSide(
|
||||
color: primaryColor,
|
||||
)
|
||||
)
|
||||
),
|
||||
checkboxTheme: CheckboxThemeData(
|
||||
checkColor: MaterialStateProperty.all(Colors.white),
|
||||
fillColor: MaterialStateProperty.all(primaryColor),
|
||||
),
|
||||
listTileTheme: const ListTileThemeData(
|
||||
tileColor: Colors.transparent,
|
||||
textColor: Color.fromRGBO(187, 187, 187, 1),
|
||||
iconColor: Color.fromRGBO(187, 187, 187, 1),
|
||||
),
|
||||
textSelectionTheme: TextSelectionThemeData(
|
||||
cursorColor: primaryColor
|
||||
),
|
||||
brightness: Brightness.dark,
|
||||
textTheme: const TextTheme(
|
||||
bodyText1: TextStyle(
|
||||
color: Colors.white70
|
||||
),
|
||||
bodyText2: TextStyle(
|
||||
color: Colors.white
|
||||
),
|
||||
),
|
||||
dividerColor: Colors.white12,
|
||||
tabBarTheme: TabBarTheme(
|
||||
unselectedLabelColor: Colors.white,
|
||||
labelColor: primaryColor,
|
||||
indicator: UnderlineTabIndicator(
|
||||
borderSide: BorderSide(
|
||||
color: primaryColor,
|
||||
width: 2
|
||||
)
|
||||
)
|
||||
),
|
||||
progressIndicatorTheme: ProgressIndicatorThemeData(
|
||||
color: primaryColor
|
||||
),
|
||||
indicatorColor: primaryColor,
|
||||
radioTheme: RadioThemeData(
|
||||
fillColor: MaterialStateProperty.all(primaryColor),
|
||||
),
|
||||
androidOverscrollIndicator: AndroidOverscrollIndicator.stretch
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue