mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
feature: Adds schemeVariants to color options (#109)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
98130f953e
commit
0b0cd3a557
11 changed files with 143 additions and 16 deletions
|
|
@ -5,9 +5,13 @@ import 'package:dynamic_color/dynamic_color.dart';
|
|||
import 'package:fladder/theme/fonts.dart';
|
||||
import 'package:fladder/util/custom_color_themes.dart';
|
||||
|
||||
ColorScheme? generateDynamicColourSchemes(ColorScheme? theme) {
|
||||
ColorScheme? generateDynamicColourSchemes(ColorScheme? theme, DynamicSchemeVariant dynamicSchemeVariant) {
|
||||
if (theme == null) return null;
|
||||
var base = ColorScheme.fromSeed(seedColor: theme.primary, brightness: theme.brightness);
|
||||
var base = ColorScheme.fromSeed(
|
||||
seedColor: theme.primary,
|
||||
dynamicSchemeVariant: dynamicSchemeVariant,
|
||||
brightness: theme.brightness,
|
||||
);
|
||||
|
||||
var newScheme = _insertAdditionalColours(base);
|
||||
|
||||
|
|
@ -33,8 +37,8 @@ class FladderTheme {
|
|||
static Color get darkBackgroundColor => const Color.fromARGB(255, 10, 10, 10);
|
||||
static Color get lightBackgroundColor => const Color.fromARGB(237, 255, 255, 255);
|
||||
|
||||
static ThemeData theme(ColorScheme? colorScheme) {
|
||||
final ColorScheme? scheme = generateDynamicColourSchemes(colorScheme);
|
||||
static ThemeData theme(ColorScheme? colorScheme, DynamicSchemeVariant dynamicSchemeVariant) {
|
||||
final ColorScheme? scheme = generateDynamicColourSchemes(colorScheme, dynamicSchemeVariant);
|
||||
|
||||
final textTheme = FladderFonts.rubikTextTheme(
|
||||
const TextTheme(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue