mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-11 21:15:37 +02:00
chore: migrate deprecation code && code cleanup (#708)
Fixes all issues in `flutter analyze`. <Reviewed> Commits: * chore: migrate deprecated text style * chore: migrate `toggleableActiveColor` to individual theme * chore: don't use 'BuildContext's across async gaps
This commit is contained in:
parent
dc665f227e
commit
3ae4d69110
16 changed files with 189 additions and 51 deletions
|
@ -40,6 +40,51 @@ var darkCustomTheme = ThemeData(
|
|||
),
|
||||
canvasColor: const Color(0xff1B1A1D),
|
||||
scaffoldBackgroundColor: const Color(0xff1B1A1D),
|
||||
toggleableActiveColor: const Color(0xffA5CAFF),
|
||||
textTheme: GoogleFonts.robotoTextTheme(ThemeData.dark().textTheme),
|
||||
switchTheme: SwitchThemeData(
|
||||
thumbColor:
|
||||
MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
|
||||
if (states.contains(MaterialState.disabled)) {
|
||||
return null;
|
||||
}
|
||||
if (states.contains(MaterialState.selected)) {
|
||||
return const Color(0xffA5CAFF);
|
||||
}
|
||||
return null;
|
||||
}),
|
||||
trackColor:
|
||||
MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
|
||||
if (states.contains(MaterialState.disabled)) {
|
||||
return null;
|
||||
}
|
||||
if (states.contains(MaterialState.selected)) {
|
||||
return const Color(0xffA5CAFF);
|
||||
}
|
||||
return null;
|
||||
}),
|
||||
),
|
||||
radioTheme: RadioThemeData(
|
||||
fillColor:
|
||||
MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
|
||||
if (states.contains(MaterialState.disabled)) {
|
||||
return null;
|
||||
}
|
||||
if (states.contains(MaterialState.selected)) {
|
||||
return const Color(0xffA5CAFF);
|
||||
}
|
||||
return null;
|
||||
}),
|
||||
),
|
||||
checkboxTheme: CheckboxThemeData(
|
||||
fillColor:
|
||||
MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
|
||||
if (states.contains(MaterialState.disabled)) {
|
||||
return null;
|
||||
}
|
||||
if (states.contains(MaterialState.selected)) {
|
||||
return const Color(0xffA5CAFF);
|
||||
}
|
||||
return null;
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue