mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: pure black theme
Closes #254 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -44,6 +44,56 @@ class Utils {
|
||||
|
||||
static const channel = MethodChannel("PiliPlus");
|
||||
|
||||
static darkenTheme(ThemeData themeData) {
|
||||
// return themeData;
|
||||
Color color = themeData.colorScheme.surfaceContainerHighest.darken(0.7);
|
||||
return themeData.copyWith(
|
||||
scaffoldBackgroundColor: Colors.black,
|
||||
appBarTheme: themeData.appBarTheme.copyWith(
|
||||
backgroundColor: Colors.black,
|
||||
),
|
||||
cardTheme: themeData.cardTheme.copyWith(
|
||||
color: Colors.black,
|
||||
),
|
||||
dialogTheme: themeData.dialogTheme.copyWith(
|
||||
backgroundColor: color,
|
||||
),
|
||||
bottomSheetTheme:
|
||||
themeData.bottomSheetTheme.copyWith(backgroundColor: color),
|
||||
bottomNavigationBarTheme:
|
||||
themeData.bottomNavigationBarTheme.copyWith(backgroundColor: color),
|
||||
navigationBarTheme:
|
||||
themeData.navigationBarTheme.copyWith(backgroundColor: color),
|
||||
navigationRailTheme:
|
||||
themeData.navigationRailTheme.copyWith(backgroundColor: Colors.black),
|
||||
colorScheme: themeData.colorScheme.copyWith(
|
||||
primary: themeData.colorScheme.primary.darken(0.1),
|
||||
onPrimary: themeData.colorScheme.onPrimary.darken(0.1),
|
||||
primaryContainer: themeData.colorScheme.primaryContainer.darken(0.1),
|
||||
onPrimaryContainer:
|
||||
themeData.colorScheme.onPrimaryContainer.darken(0.1),
|
||||
inversePrimary: themeData.colorScheme.inversePrimary.darken(0.1),
|
||||
secondary: themeData.colorScheme.secondary.darken(0.1),
|
||||
onSecondary: themeData.colorScheme.onSecondary.darken(0.1),
|
||||
secondaryContainer:
|
||||
themeData.colorScheme.secondaryContainer.darken(0.1),
|
||||
onSecondaryContainer:
|
||||
themeData.colorScheme.onSecondaryContainer.darken(0.1),
|
||||
error: themeData.colorScheme.error.darken(0.1),
|
||||
surface: Colors.black,
|
||||
onSurface: themeData.colorScheme.onSurface.darken(0.15),
|
||||
surfaceTint: themeData.colorScheme.surfaceTint.darken(),
|
||||
inverseSurface: themeData.colorScheme.inverseSurface.darken(),
|
||||
onInverseSurface: themeData.colorScheme.onInverseSurface.darken(),
|
||||
surfaceContainer: themeData.colorScheme.surfaceContainer.darken(),
|
||||
surfaceContainerHigh:
|
||||
themeData.colorScheme.surfaceContainerHigh.darken(),
|
||||
surfaceContainerHighest:
|
||||
themeData.colorScheme.surfaceContainerHighest.darken(0.4),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static void onCopyOrMove({
|
||||
required BuildContext context,
|
||||
required bool isCopy,
|
||||
|
||||
Reference in New Issue
Block a user