Skip to content

Commit

Permalink
feat: update color scheme to use ReVanced #F04E98
Browse files Browse the repository at this point in the history
  • Loading branch information
validcube committed Nov 11, 2023
1 parent a3adace commit 5a18177
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 21 deletions.
14 changes: 7 additions & 7 deletions lib/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

var lightCustomColorScheme = ColorScheme.fromSeed(
seedColor: Colors.blue,
primary: const Color(0xff1B73E8),
seedColor: Colors.pink,
primary: const Color(0xFFB31869),
);

var lightCustomTheme = ThemeData(
Expand All @@ -21,10 +21,10 @@ var lightCustomTheme = ThemeData(
);

var darkCustomColorScheme = ColorScheme.fromSeed(
seedColor: Colors.blue,
seedColor: Colors.pink,
brightness: Brightness.dark,
primary: const Color(0xffA5CAFF),
surface: const Color(0xff1B1A1D),
primary: const Color(0xFFFFB0CB),
surface: const Color(0xFF171213),
);

var darkCustomTheme = ThemeData(
Expand All @@ -38,7 +38,7 @@ var darkCustomTheme = ThemeData(
),
),
),
canvasColor: const Color(0xff1B1A1D),
scaffoldBackgroundColor: const Color(0xff1B1A1D),
canvasColor: const Color(0xFF171213),
scaffoldBackgroundColor: const Color(0xFF171213),
textTheme: GoogleFonts.robotoTextTheme(ThemeData.dark().textTheme),
);
37 changes: 23 additions & 14 deletions lib/ui/theme/dynamic_theme_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class DynamicThemeBuilder extends StatefulWidget {
State<DynamicThemeBuilder> createState() => _DynamicThemeBuilderState();
}

class _DynamicThemeBuilderState extends State<DynamicThemeBuilder> with WidgetsBindingObserver {
class _DynamicThemeBuilderState extends State<DynamicThemeBuilder>
with WidgetsBindingObserver {
Brightness brightness = PlatformDispatcher.instance.platformBrightness;
final ManagerAPI _managerAPI = locator<ManagerAPI>();

Expand All @@ -43,8 +44,9 @@ class _DynamicThemeBuilderState extends State<DynamicThemeBuilder> with WidgetsB
if (_managerAPI.getThemeMode() < 2) {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
systemNavigationBarIconBrightness:
brightness == Brightness.light ? Brightness.dark : Brightness.light,
systemNavigationBarIconBrightness: brightness == Brightness.light
? Brightness.dark
: Brightness.light,
),
);
}
Expand Down Expand Up @@ -83,24 +85,31 @@ class _DynamicThemeBuilderState extends State<DynamicThemeBuilder> with WidgetsB
return DynamicTheme(
themeCollection: ThemeCollection(
themes: {
0: brightness == Brightness.light ? lightCustomTheme : darkCustomTheme,
1: brightness == Brightness.light ? lightDynamicTheme : darkDynamicTheme,
0: brightness == Brightness.light
? lightCustomTheme
: darkCustomTheme,
1: brightness == Brightness.light
? lightDynamicTheme
: darkDynamicTheme,
2: lightCustomTheme,
3: lightDynamicTheme,
4: darkCustomTheme,
5: darkDynamicTheme,
},
fallbackTheme: PlatformDispatcher.instance.platformBrightness == Brightness.light ? lightCustomTheme : darkCustomTheme,
fallbackTheme: PlatformDispatcher.instance.platformBrightness ==
Brightness.light
? lightCustomTheme
: darkCustomTheme,
),
builder: (context, theme) => MaterialApp(
debugShowCheckedModeBanner: false,
title: widget.title,
navigatorKey: StackedService.navigatorKey,
onGenerateRoute: StackedRouter().onGenerateRoute,
theme: theme,
home: widget.home,
localizationsDelegates: widget.localizationsDelegates,
),
debugShowCheckedModeBanner: false,
title: widget.title,
navigatorKey: StackedService.navigatorKey,
onGenerateRoute: StackedRouter().onGenerateRoute,
theme: theme,
home: widget.home,
localizationsDelegates: widget.localizationsDelegates,
),
);
},
);
Expand Down

0 comments on commit 5a18177

Please sign in to comment.