mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-27 13:55:54 +08:00
opt: escape performReassemble (#1864)
This commit is contained in:
committed by
GitHub
parent
96f9972895
commit
aee4424dbf
@@ -250,26 +250,34 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final dynamicColor = Pref.dynamicColor && _light != null && _dark != null;
|
||||
static (ThemeData, ThemeData) getAllTheme() {
|
||||
final dynamicColor = _light != null && _dark != null && Pref.dynamicColor;
|
||||
late final brandColor = colorThemeTypes[Pref.customColor].color;
|
||||
late final variant = Pref.schemeVariant;
|
||||
return GetMaterialApp(
|
||||
title: Constants.appName,
|
||||
theme: ThemeUtils.getThemeData(
|
||||
return (
|
||||
ThemeUtils.getThemeData(
|
||||
colorScheme: dynamicColor
|
||||
? _light!
|
||||
: brandColor.asColorSchemeSeed(variant, .light),
|
||||
isDynamic: dynamicColor,
|
||||
),
|
||||
darkTheme: ThemeUtils.getThemeData(
|
||||
ThemeUtils.getThemeData(
|
||||
isDark: true,
|
||||
colorScheme: dynamicColor
|
||||
? _dark!
|
||||
: brandColor.asColorSchemeSeed(variant, .dark),
|
||||
isDynamic: dynamicColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final (light, dark) = getAllTheme();
|
||||
return GetMaterialApp(
|
||||
title: Constants.appName,
|
||||
theme: light,
|
||||
darkTheme: dark,
|
||||
themeMode: Pref.themeMode,
|
||||
localizationsDelegates: const [
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
|
||||
Reference in New Issue
Block a user