revanced-manager/lib/theme.dart

91 lines
2.5 KiB
Dart
Raw Normal View History

2022-08-01 13:30:06 +02:00
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
var lightCustomColorScheme = ColorScheme.fromSeed(
seedColor: Colors.blue,
2022-09-17 10:02:49 +02:00
primary: const Color(0xff1B73E8),
);
var lightCustomTheme = ThemeData(
2022-08-01 13:30:06 +02:00
useMaterial3: true,
colorScheme: lightCustomColorScheme,
2022-09-06 19:07:23 +02:00
navigationBarTheme: NavigationBarThemeData(
labelTextStyle: MaterialStateProperty.all(
TextStyle(
color: lightCustomColorScheme.secondary,
2022-09-06 19:07:23 +02:00
fontWeight: FontWeight.w500,
),
),
),
textTheme: GoogleFonts.robotoTextTheme(ThemeData.light().textTheme),
2022-08-01 13:30:06 +02:00
);
var darkCustomColorScheme = ColorScheme.fromSeed(
seedColor: Colors.blue,
brightness: Brightness.dark,
2022-09-17 10:02:49 +02:00
primary: const Color(0xffA5CAFF),
surface: const Color(0xff1B1A1D),
);
var darkCustomTheme = ThemeData(
2022-08-01 13:30:06 +02:00
useMaterial3: true,
colorScheme: darkCustomColorScheme,
2022-09-06 19:07:23 +02:00
navigationBarTheme: NavigationBarThemeData(
labelTextStyle: MaterialStateProperty.all(
TextStyle(
color: darkCustomColorScheme.secondary,
2022-09-06 19:07:23 +02:00
fontWeight: FontWeight.w500,
),
),
),
2022-09-17 10:02:49 +02:00
canvasColor: const Color(0xff1B1A1D),
scaffoldBackgroundColor: const Color(0xff1B1A1D),
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;
}),
),
2022-08-01 13:30:06 +02:00
);