mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-23 23:39:12 +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
|
||||
);
|
|
@ -12,7 +12,7 @@ Map<String, dynamic> getFilteredStatus(BuildContext context, AppConfigProvider a
|
|||
? AppLocalizations.of(context)!.processedRow
|
||||
: AppLocalizations.of(context)!.processed,
|
||||
'color': appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green,
|
||||
'icon': Icons.verified_user_rounded,
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ Map<String, dynamic> getFilteredStatus(BuildContext context, AppConfigProvider a
|
|||
? AppLocalizations.of(context)!.processedWhitelistRow
|
||||
: AppLocalizations.of(context)!.processedWhitelist,
|
||||
'color': appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green,
|
||||
'icon': Icons.verified_user_rounded,
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ Map<String, dynamic> getFilteredStatus(BuildContext context, AppConfigProvider a
|
|||
? AppLocalizations.of(context)!.processedErrorRow
|
||||
: AppLocalizations.of(context)!.processedError,
|
||||
'color': appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green,
|
||||
'icon': Icons.verified_user_rounded,
|
||||
};
|
||||
|
|
|
@ -231,7 +231,7 @@ class _AddedListState extends State<AddedList> {
|
|||
size: 19,
|
||||
color: widget.data[index].filteringEnabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
@ -243,7 +243,7 @@ class _AddedListState extends State<AddedList> {
|
|||
size: 18,
|
||||
color: widget.data[index].safebrowsingEnabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
@ -255,7 +255,7 @@ class _AddedListState extends State<AddedList> {
|
|||
size: 18,
|
||||
color: widget.data[index].parentalEnabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
@ -267,7 +267,7 @@ class _AddedListState extends State<AddedList> {
|
|||
size: 19,
|
||||
color: widget.data[index].safesearchEnabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
|
|
@ -127,7 +127,7 @@ class _ClientScreenState extends State<ClientScreen> {
|
|||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 16,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -233,7 +233,7 @@ class _ClientScreenState extends State<ClientScreen> {
|
|||
? Switch(
|
||||
value: value!,
|
||||
onChanged: onChange,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 14),
|
||||
|
@ -434,7 +434,7 @@ class _ClientScreenState extends State<ClientScreen> {
|
|||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: Material(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
child: InkWell(
|
||||
onTap: editMode
|
||||
|
@ -461,7 +461,7 @@ class _ClientScreenState extends State<ClientScreen> {
|
|||
onChanged: editMode == true
|
||||
? (value) => enableDisableGlobalSettingsFiltering()
|
||||
: null,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -502,7 +502,7 @@ class _ClientScreenState extends State<ClientScreen> {
|
|||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: Material(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
child: InkWell(
|
||||
onTap: editMode == true
|
||||
|
@ -529,7 +529,7 @@ class _ClientScreenState extends State<ClientScreen> {
|
|||
onChanged: editMode == true
|
||||
? (value) => updateServicesGlobalSettings(value)
|
||||
: null,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
@ -303,7 +303,7 @@ class _SearchClientsWidgetState extends State<SearchClientsWidget> {
|
|||
size: 19,
|
||||
color: clientsScreen[index].filteringEnabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
@ -315,7 +315,7 @@ class _SearchClientsWidgetState extends State<SearchClientsWidget> {
|
|||
size: 18,
|
||||
color: clientsScreen[index].safebrowsingEnabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
@ -327,7 +327,7 @@ class _SearchClientsWidgetState extends State<SearchClientsWidget> {
|
|||
size: 18,
|
||||
color: clientsScreen[index].parentalEnabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
@ -339,7 +339,7 @@ class _SearchClientsWidgetState extends State<SearchClientsWidget> {
|
|||
size: 19,
|
||||
color: clientsScreen[index].safesearchEnabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
|
|
@ -103,7 +103,7 @@ class _ServicesModalState extends State<ServicesModal> {
|
|||
AppLocalizations.of(context)!.confirm,
|
||||
style: TextStyle(
|
||||
color: blockedServices.isNotEmpty
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.onSurface.withOpacity(0.38)
|
||||
),
|
||||
)
|
||||
|
|
|
@ -100,7 +100,7 @@ class _TagsModalState extends State<TagsModal> {
|
|||
AppLocalizations.of(context)!.confirm,
|
||||
style: TextStyle(
|
||||
color: selectedTags.isNotEmpty
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.onSurface.withOpacity(0.38)
|
||||
),
|
||||
)
|
||||
|
|
|
@ -101,7 +101,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
? Theme.of(context).floatingActionButtonTheme.foregroundColor!
|
||||
: preset == 0
|
||||
? Colors.white
|
||||
: Theme.of(context).primaryColor,
|
||||
: Theme.of(context).colorScheme.primary,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
|
@ -113,7 +113,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
? Theme.of(context).floatingActionButtonTheme.foregroundColor!
|
||||
: preset == 1
|
||||
? Colors.white
|
||||
: Theme.of(context).primaryColor,
|
||||
: Theme.of(context).colorScheme.primary,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
|
@ -125,7 +125,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
? Theme.of(context).floatingActionButtonTheme.foregroundColor!
|
||||
: preset == 2
|
||||
? Colors.white
|
||||
: Theme.of(context).primaryColor,
|
||||
: Theme.of(context).colorScheme.primary,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
|
@ -161,17 +161,17 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
vertical: 5
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
)
|
||||
),
|
||||
child: Text(
|
||||
buildRule(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).primaryColor,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
)
|
||||
|
@ -241,7 +241,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
Switch(
|
||||
value: addImportant,
|
||||
onChanged: (value) => setState(() => addImportant = value),
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -284,7 +284,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
|
@ -292,7 +292,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
AppLocalizations.of(context)!.example1,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
|
@ -302,7 +302,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
|
@ -310,7 +310,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
AppLocalizations.of(context)!.example2,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
|
@ -320,7 +320,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
Text(
|
||||
|
@ -329,7 +329,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
|
@ -337,7 +337,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
AppLocalizations.of(context)!.example3,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
|
@ -347,7 +347,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
|
@ -355,7 +355,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
AppLocalizations.of(context)!.example4,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -430,7 +430,7 @@ class _AddCustomRuleState extends State<AddCustomRule> {
|
|||
// AppLocalizations.of(context)!.confirm,
|
||||
// style: TextStyle(
|
||||
// color: checkValidValues() == true
|
||||
// ? Theme.of(context).primaryColor
|
||||
// ? Theme.of(context).colorScheme.primary
|
||||
// : Colors.grey
|
||||
// ),
|
||||
// )
|
||||
|
|
|
@ -71,7 +71,7 @@ class _CheckHostModalState extends State<CheckHostModal> {
|
|||
? Colors.grey
|
||||
: Colors.red
|
||||
: appConfigProvider.useThemeColorForStatus
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
|
@ -83,7 +83,7 @@ class _CheckHostModalState extends State<CheckHostModal> {
|
|||
? Colors.grey
|
||||
: Colors.red
|
||||
: appConfigProvider.useThemeColorForStatus
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
|
@ -223,7 +223,7 @@ class _CheckHostModalState extends State<CheckHostModal> {
|
|||
AppLocalizations.of(context)!.check,
|
||||
style: TextStyle(
|
||||
color: domainController.text != '' && domainError == null
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.grey
|
||||
),
|
||||
),
|
||||
|
|
|
@ -301,7 +301,7 @@ class _FiltersWidgetState extends State<FiltersWidget> with TickerProviderStateM
|
|||
size: 12,
|
||||
color: serversProvider.filtering.data!.enabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
|
|
@ -111,7 +111,7 @@ class _FiltersListState extends State<FiltersList> {
|
|||
: Icons.cancel,
|
||||
color: widget.data[index].enabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
|
|
@ -260,7 +260,7 @@ class _ListDetailsScreenState extends State<ListDetailsScreen> {
|
|||
: AppLocalizations.of(context)!.disabled,
|
||||
color: enabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
|
|
@ -110,7 +110,7 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
|
|||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
color: selectedOption == 0
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).textTheme.bodyText1!.color
|
||||
),
|
||||
child: Text(AppLocalizations.of(context)!.never),
|
||||
|
@ -136,7 +136,7 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
|
|||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
color: selectedOption == 1
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).textTheme.bodyText1!.color
|
||||
),
|
||||
child: Text(AppLocalizations.of(context)!.hour1),
|
||||
|
@ -167,7 +167,7 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
|
|||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
color: selectedOption == 12
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).textTheme.bodyText1!.color
|
||||
),
|
||||
child: Text(AppLocalizations.of(context)!.hours12),
|
||||
|
@ -193,7 +193,7 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
|
|||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
color: selectedOption == 24
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).textTheme.bodyText1!.color
|
||||
),
|
||||
child: Text(AppLocalizations.of(context)!.hours24),
|
||||
|
@ -224,7 +224,7 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
|
|||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
color: selectedOption == 72
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).textTheme.bodyText1!.color
|
||||
),
|
||||
child: Text(AppLocalizations.of(context)!.days3),
|
||||
|
@ -250,7 +250,7 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
|
|||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
color: selectedOption == 168
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).textTheme.bodyText1!.color
|
||||
),
|
||||
child: Text(AppLocalizations.of(context)!.days7),
|
||||
|
@ -286,11 +286,11 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
|
|||
: null,
|
||||
style: ButtonStyle(
|
||||
overlayColor: MaterialStateProperty.all(
|
||||
Theme.of(context).primaryColor.withOpacity(0.1)
|
||||
Theme.of(context).colorScheme.primary.withOpacity(0.1)
|
||||
),
|
||||
foregroundColor: MaterialStateProperty.all(
|
||||
selectedOption != null
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.grey,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -63,7 +63,7 @@ class HomeAppBar extends StatelessWidget with PreferredSizeWidget {
|
|||
color: serversProvider.selectedServer != null && serversProvider.serverStatus.data != null
|
||||
? serversProvider.serverStatus.data!.generalEnabled == true
|
||||
? appConfigProvider.useThemeColorForStatus
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).colorScheme.onSurface.withOpacity(0.38)
|
||||
|
|
|
@ -194,7 +194,7 @@ class _HomeState extends State<Home> {
|
|||
return Scaffold(
|
||||
appBar: const HomeAppBar(),
|
||||
body: RefreshIndicator(
|
||||
color: Theme.of(context).primaryColor,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
onRefresh: () async {
|
||||
final result = await getServerStatus(serversProvider.selectedServer!);
|
||||
if (result['result'] == 'success') {
|
||||
|
|
|
@ -38,7 +38,7 @@ class ManagementModal extends StatelessWidget {
|
|||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: Material(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
child: InkWell(
|
||||
onTap: serversProvider.protectionsManagementProcess.contains('general') == false
|
||||
|
@ -64,7 +64,7 @@ class ManagementModal extends StatelessWidget {
|
|||
onChanged: serversProvider.protectionsManagementProcess.contains('general') == false
|
||||
? (value) => updateBlocking(value, 'general')
|
||||
: null,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -112,7 +112,7 @@ class ManagementModal extends StatelessWidget {
|
|||
onChanged: disabled == false
|
||||
? onChange
|
||||
: null,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
@ -28,7 +28,7 @@ class StatusBox extends StatelessWidget {
|
|||
decoration: BoxDecoration(
|
||||
color: isEnabled == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
@ -40,7 +40,7 @@ class StatusBox extends StatelessWidget {
|
|||
Icon(
|
||||
icon,
|
||||
color: appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
? Theme.of(context).colorScheme.primary.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
: Colors.grey.computeLuminance() > 0.5 ? Colors.black : Colors.white,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
|
@ -48,7 +48,7 @@ class StatusBox extends StatelessWidget {
|
|||
label,
|
||||
style: TextStyle(
|
||||
color: appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
? Theme.of(context).colorScheme.primary.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
: Colors.grey.computeLuminance() > 0.5 ? Colors.black : Colors.white,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
|
|
|
@ -37,7 +37,8 @@ class LogTile extends StatelessWidget {
|
|||
required Color color,
|
||||
required String text
|
||||
}) {
|
||||
return Flexible(
|
||||
return SizedBox(
|
||||
width: 70,
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(
|
||||
|
|
|
@ -395,7 +395,7 @@ class _LogsWidgetState extends State<LogsWidget> {
|
|||
avatar: Icon(
|
||||
Icons.search,
|
||||
size: 24,
|
||||
color: Theme.of(context).primaryColor,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
label: Row(
|
||||
children: [
|
||||
|
@ -441,7 +441,7 @@ class _LogsWidgetState extends State<LogsWidget> {
|
|||
avatar: Icon(
|
||||
Icons.shield_rounded,
|
||||
size: 24,
|
||||
color: Theme.of(context).primaryColor,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
label: Row(
|
||||
children: [
|
||||
|
|
|
@ -147,7 +147,7 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
|
|||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: Material(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
child: InkWell(
|
||||
onTap: () => setState(() => generalSwitch = !generalSwitch),
|
||||
|
@ -169,7 +169,7 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
|
|||
Switch(
|
||||
value: generalSwitch,
|
||||
onChanged: (value) => setState(() => generalSwitch = value),
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -196,7 +196,7 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
|
|||
Switch(
|
||||
value: anonymizeClientIp,
|
||||
onChanged: (value) => setState(() => anonymizeClientIp = value),
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -263,7 +263,7 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
|
|||
AppLocalizations.of(context)!.confirm,
|
||||
style: TextStyle(
|
||||
color: retentionTime != ''
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.grey
|
||||
),
|
||||
)
|
||||
|
|
|
@ -139,7 +139,7 @@ class _AddClientModalState extends State<AddClientModal> {
|
|||
AppLocalizations.of(context)!.confirm,
|
||||
style: TextStyle(
|
||||
color: validData == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.grey
|
||||
),
|
||||
)
|
||||
|
|
|
@ -49,7 +49,7 @@ class AdvancedSettings extends StatelessWidget {
|
|||
trailing: Switch(
|
||||
value: appConfigProvider.overrideSslCheck,
|
||||
onChanged: updateSslCheck,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
onTap: () => updateSslCheck(!appConfigProvider.overrideSslCheck),
|
||||
padding: const EdgeInsets.only(
|
||||
|
|
|
@ -89,11 +89,11 @@ class _AppLogDetailsModalState extends State<AppLogDetailsModal> {
|
|||
bottomLeft: Radius.circular(15)
|
||||
),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
color: valueToShow == 'message'
|
||||
? Theme.of(context).primaryColor
|
||||
: Theme.of(context).primaryColor.withOpacity(0.05)
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.primary.withOpacity(0.05)
|
||||
),
|
||||
child: Text(
|
||||
"Message",
|
||||
|
@ -117,15 +117,15 @@ class _AppLogDetailsModalState extends State<AppLogDetailsModal> {
|
|||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
color: valueToShow == 'statusCode'
|
||||
? Theme.of(context).primaryColor
|
||||
: Theme.of(context).primaryColor.withOpacity(0.05)
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.primary.withOpacity(0.05)
|
||||
),
|
||||
child: Text(
|
||||
"Status code",
|
||||
|
@ -160,11 +160,11 @@ class _AppLogDetailsModalState extends State<AppLogDetailsModal> {
|
|||
bottomRight: Radius.circular(15)
|
||||
),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
color: valueToShow == 'body'
|
||||
? Theme.of(context).primaryColor
|
||||
: Theme.of(context).primaryColor.withOpacity(0.05)
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.primary.withOpacity(0.05)
|
||||
),
|
||||
child: Text(
|
||||
"Body",
|
||||
|
|
|
@ -41,10 +41,10 @@ class ThemeModeButton extends StatelessWidget {
|
|||
backgroundColor: MaterialStateProperty.all(
|
||||
value == selected
|
||||
? disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: greyBackgroundColor
|
||||
: disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor.withOpacity(0.1)
|
||||
? Theme.of(context).colorScheme.surfaceVariant
|
||||
: greyBackgroundColor,
|
||||
)
|
||||
),
|
||||
|
@ -60,10 +60,10 @@ class ThemeModeButton extends StatelessWidget {
|
|||
icon,
|
||||
color: value == selected
|
||||
? disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
? Theme.of(context).colorScheme.primary.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
: greyIconColor
|
||||
: disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: greyIconColor,
|
||||
size: 30,
|
||||
),
|
||||
|
@ -72,10 +72,10 @@ class ThemeModeButton extends StatelessWidget {
|
|||
style: TextStyle(
|
||||
color: value == selected
|
||||
? disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
? Theme.of(context).colorScheme.primary.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
: greyIconColor
|
||||
: disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: greyIconColor,
|
||||
fontSize: 18
|
||||
),
|
||||
|
|
|
@ -193,7 +193,7 @@ class _AddStaticLeaseModalState extends State<AddStaticLeaseModal> {
|
|||
AppLocalizations.of(context)!.confirm,
|
||||
style: TextStyle(
|
||||
color: validData == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.grey
|
||||
),
|
||||
),
|
||||
|
|
|
@ -408,7 +408,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
right: 16
|
||||
),
|
||||
child: Material(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
child: InkWell(
|
||||
onTap: selectedInterface != null
|
||||
|
@ -449,7 +449,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
onChanged: selectedInterface != null
|
||||
? (value) => setState(() => enabled = value)
|
||||
: null,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -116,7 +116,7 @@ class _CommentModalState extends State<CommentModal> {
|
|||
AppLocalizations.of(context)!.confirm,
|
||||
style: TextStyle(
|
||||
color: validData == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.grey
|
||||
),
|
||||
)
|
||||
|
|
|
@ -148,7 +148,7 @@ class _AddDnsRewriteModalState extends State<AddDnsRewriteModal> {
|
|||
AppLocalizations.of(context)!.confirm,
|
||||
style: TextStyle(
|
||||
color: validData == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.onSurface.withOpacity(0.38)
|
||||
),
|
||||
),
|
||||
|
|
|
@ -67,7 +67,7 @@ Widget generateStatus(BuildContext context, AppConfigProvider appConfigProvider,
|
|||
return Icon(
|
||||
Icons.check_circle_rounded,
|
||||
color: appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ class EncryptionMasterSwitch extends StatelessWidget {
|
|||
right: 16
|
||||
),
|
||||
child: Material(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
child: InkWell(
|
||||
onTap: () => onChange(!value),
|
||||
|
@ -58,7 +58,7 @@ class EncryptionMasterSwitch extends StatelessWidget {
|
|||
Switch(
|
||||
value: value,
|
||||
onChanged: (value) => onChange(value),
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -29,7 +29,7 @@ class Status extends StatelessWidget {
|
|||
borderRadius: BorderRadius.circular(10),
|
||||
color: valid == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
|
|
@ -68,7 +68,7 @@ class GeneralSettings extends StatelessWidget {
|
|||
trailing: Switch(
|
||||
value: appConfigProvider.hideZeroValues,
|
||||
onChanged: updateHideZeroValues,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
onTap: () => updateHideZeroValues(!appConfigProvider.hideZeroValues),
|
||||
padding: const EdgeInsets.only(
|
||||
|
@ -85,7 +85,7 @@ class GeneralSettings extends StatelessWidget {
|
|||
trailing: Switch(
|
||||
value: appConfigProvider.showNameTimeLogs,
|
||||
onChanged: updateShowNameTimeLogs,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
onTap: () => updateShowNameTimeLogs(!appConfigProvider.showNameTimeLogs),
|
||||
padding: const EdgeInsets.only(
|
||||
|
|
|
@ -253,8 +253,8 @@ class _TopItemsScreenState extends State<TopItemsScreen> {
|
|||
curve: Curves.easeOut,
|
||||
percent: screenData[index].values.toList()[0]/total,
|
||||
barRadius: const Radius.circular(5),
|
||||
progressColor: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor.withOpacity(0.15),
|
||||
progressColor: Theme.of(context).colorScheme.primary,
|
||||
backgroundColor: Theme.of(context).colorScheme.surfaceVariant,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
|
|
|
@ -68,7 +68,7 @@ class _AddServerModalState extends State<AddServerModal> {
|
|||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -494,17 +494,17 @@ class _AddServerModalState extends State<AddServerModal> {
|
|||
right: 24
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.05),
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.05),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
)
|
||||
),
|
||||
child: Text(
|
||||
"${connectionType.name}://${ipDomainController.text}${portController.text != '' ? ':${portController.text}' : ""}${pathController.text}",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).primaryColor,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
|
@ -612,7 +612,7 @@ class _AddServerModalState extends State<AddServerModal> {
|
|||
onChanged: widget.server == null
|
||||
? (value) => setState(() => defaultServer = value)
|
||||
: null,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -638,7 +638,7 @@ class _AddServerModalState extends State<AddServerModal> {
|
|||
Switch(
|
||||
value: homeAssistant,
|
||||
onChanged: (value) => setState(() => homeAssistant = value),
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
@ -25,7 +25,7 @@ class CustomRadio extends StatelessWidget {
|
|||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
color: value == groupValue
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).brightness == Brightness.dark
|
||||
? const Color.fromRGBO(184, 184, 184, 1)
|
||||
: const Color.fromRGBO(104, 104, 104, 1)
|
||||
|
@ -47,7 +47,7 @@ class CustomRadio extends StatelessWidget {
|
|||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
color: value == groupValue
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: backgroundColor
|
||||
),
|
||||
),
|
||||
|
|
|
@ -31,10 +31,10 @@ class CustomRadioToggle extends StatelessWidget {
|
|||
),
|
||||
decoration: BoxDecoration(
|
||||
color: groupSelected == value
|
||||
? Theme.of(context).primaryColor
|
||||
: Theme.of(context).primaryColor.withOpacity(0.05),
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.primary.withOpacity(0.05),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
borderRadius: BorderRadius.circular(30)
|
||||
),
|
||||
|
@ -48,7 +48,7 @@ class CustomRadioToggle extends StatelessWidget {
|
|||
fontWeight: FontWeight.w500,
|
||||
color: groupSelected == value
|
||||
? Colors.white
|
||||
: Theme.of(context).primaryColor
|
||||
: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
)
|
||||
],
|
||||
|
|
|
@ -68,7 +68,7 @@ class CustomSwitchListTile extends StatelessWidget {
|
|||
onChanged: disabled != null && disabled == true
|
||||
? null
|
||||
: onChanged,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
@ -30,11 +30,11 @@ class OptionBox extends StatelessWidget {
|
|||
borderRadius: BorderRadius.circular(50),
|
||||
border: Border.all(
|
||||
color: optionsValue == itemValue
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.grey
|
||||
),
|
||||
color: optionsValue == itemValue
|
||||
? Theme.of(context).primaryColor.withOpacity(0.1)
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.transparent,
|
||||
),
|
||||
child: child,
|
||||
|
|
|
@ -22,7 +22,7 @@ class SectionLabel extends StatelessWidget {
|
|||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 16,
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -373,7 +373,7 @@ class _ServersListState extends State<ServersList> with SingleTickerProviderStat
|
|||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
color: Theme.of(context).colorScheme.surfaceVariant,
|
||||
width: 1
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue