mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-23 07:19:11 +00:00
Theme changes
This commit is contained in:
parent
1ec4be5bc7
commit
f02406cf9d
1 changed files with 35 additions and 59 deletions
|
@ -1,64 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
ThemeData lightTheme(ColorScheme? dynamicColorScheme) => ThemeData(
|
final baseTheme = ThemeData(
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
colorScheme: dynamicColorScheme,
|
|
||||||
snackBarTheme: SnackBarThemeData(
|
|
||||||
behavior: SnackBarBehavior.floating,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(5)
|
|
||||||
),
|
|
||||||
elevation: 4,
|
|
||||||
),
|
|
||||||
brightness: Brightness.light, listTileTheme: ListTileThemeData(
|
|
||||||
tileColor: Colors.transparent,
|
|
||||||
textColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(117, 117, 117, 1),
|
|
||||||
iconColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(117, 117, 117, 1),
|
|
||||||
),
|
|
||||||
androidOverscrollIndicator: AndroidOverscrollIndicator.stretch,
|
|
||||||
);
|
|
||||||
|
|
||||||
ThemeData darkTheme(ColorScheme? dynamicColorScheme) => ThemeData(
|
|
||||||
useMaterial3: true,
|
|
||||||
colorScheme: dynamicColorScheme,
|
|
||||||
snackBarTheme: SnackBarThemeData(
|
|
||||||
behavior: SnackBarBehavior.floating,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(5)
|
|
||||||
),
|
|
||||||
elevation: 4,
|
|
||||||
),
|
|
||||||
brightness: Brightness.dark,
|
|
||||||
listTileTheme: ListTileThemeData(
|
|
||||||
tileColor: Colors.transparent,
|
|
||||||
textColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1),
|
|
||||||
iconColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1),
|
|
||||||
),
|
|
||||||
androidOverscrollIndicator: AndroidOverscrollIndicator.stretch,
|
|
||||||
);
|
|
||||||
|
|
||||||
ThemeData lightThemeOldVersions(MaterialColor primaryColor) => ThemeData(
|
|
||||||
useMaterial3: true,
|
|
||||||
colorSchemeSeed: primaryColor,
|
|
||||||
snackBarTheme: SnackBarThemeData(
|
|
||||||
behavior: SnackBarBehavior.floating,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(5)
|
|
||||||
),
|
|
||||||
elevation: 4,
|
|
||||||
),
|
|
||||||
listTileTheme: const ListTileThemeData(
|
|
||||||
tileColor: Colors.transparent,
|
|
||||||
textColor: Color.fromRGBO(117, 117, 117, 1),
|
|
||||||
iconColor: Color.fromRGBO(117, 117, 117, 1),
|
|
||||||
),
|
|
||||||
brightness: Brightness.light,
|
|
||||||
androidOverscrollIndicator: AndroidOverscrollIndicator.stretch
|
|
||||||
);
|
|
||||||
|
|
||||||
ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData(
|
|
||||||
useMaterial3: true,
|
|
||||||
colorSchemeSeed: primaryColor,
|
|
||||||
snackBarTheme: SnackBarThemeData(
|
snackBarTheme: SnackBarThemeData(
|
||||||
contentTextStyle: const TextStyle(
|
contentTextStyle: const TextStyle(
|
||||||
color: Colors.white
|
color: Colors.white
|
||||||
|
@ -69,11 +12,44 @@ ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData(
|
||||||
),
|
),
|
||||||
elevation: 4,
|
elevation: 4,
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
ThemeData lightTheme(ColorScheme? dynamicColorScheme) => baseTheme.copyWith(
|
||||||
|
colorScheme: dynamicColorScheme,
|
||||||
|
brightness: Brightness.light,
|
||||||
|
listTileTheme: ListTileThemeData(
|
||||||
|
tileColor: Colors.transparent,
|
||||||
|
textColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(117, 117, 117, 1),
|
||||||
|
iconColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(117, 117, 117, 1),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
ThemeData darkTheme(ColorScheme? dynamicColorScheme) => baseTheme.copyWith(
|
||||||
|
colorScheme: dynamicColorScheme,
|
||||||
|
brightness: Brightness.dark,
|
||||||
|
listTileTheme: ListTileThemeData(
|
||||||
|
tileColor: Colors.transparent,
|
||||||
|
textColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1),
|
||||||
|
iconColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
ThemeData lightThemeOldVersions(MaterialColor primaryColor) => baseTheme.copyWith(
|
||||||
|
colorScheme: ColorScheme.fromSeed(seedColor: primaryColor),
|
||||||
|
listTileTheme: const ListTileThemeData(
|
||||||
|
tileColor: Colors.transparent,
|
||||||
|
textColor: Color.fromRGBO(117, 117, 117, 1),
|
||||||
|
iconColor: Color.fromRGBO(117, 117, 117, 1),
|
||||||
|
),
|
||||||
|
brightness: Brightness.light,
|
||||||
|
);
|
||||||
|
|
||||||
|
ThemeData darkThemeOldVersions(MaterialColor primaryColor) => baseTheme.copyWith(
|
||||||
|
colorScheme: ColorScheme.fromSeed(seedColor: primaryColor),
|
||||||
listTileTheme: const ListTileThemeData(
|
listTileTheme: const ListTileThemeData(
|
||||||
tileColor: Colors.transparent,
|
tileColor: Colors.transparent,
|
||||||
textColor: Color.fromRGBO(187, 187, 187, 1),
|
textColor: Color.fromRGBO(187, 187, 187, 1),
|
||||||
iconColor: Color.fromRGBO(187, 187, 187, 1),
|
iconColor: Color.fromRGBO(187, 187, 187, 1),
|
||||||
),
|
),
|
||||||
brightness: Brightness.dark,
|
brightness: Brightness.dark,
|
||||||
androidOverscrollIndicator: AndroidOverscrollIndicator.stretch
|
|
||||||
);
|
);
|
Loading…
Add table
Reference in a new issue