omfg really sok progress
This commit is contained in:
@@ -31,3 +31,66 @@ Map<AccentColor, Color> accentColorMap = {
|
||||
AccentColor.adaptive: const Color(0xFF3D7BF4),
|
||||
AccentColor.custom: const Color(0xFF3D7BF4),
|
||||
};
|
||||
|
||||
// new v5 things
|
||||
Map<AccentColor, Color> lightPrimary = {
|
||||
AccentColor.filc: const Color(0xFF050B15),
|
||||
};
|
||||
Map<AccentColor, Color> lightSecondary = {
|
||||
AccentColor.filc: const Color(0xFF3F444F),
|
||||
};
|
||||
Map<AccentColor, Color> lightTeritary = {
|
||||
AccentColor.filc: const Color(0xFF1C469A),
|
||||
};
|
||||
Map<AccentColor, Color> lightIcon = {
|
||||
AccentColor.filc: const Color(0xFF0A2456),
|
||||
};
|
||||
Map<AccentColor, Color> lightAccent = {
|
||||
AccentColor.filc: const Color(0xFF487DE6),
|
||||
};
|
||||
Map<AccentColor, Color> lightBgDarkened = {
|
||||
AccentColor.filc: const Color(0xFFB9C8E5),
|
||||
};
|
||||
Map<AccentColor, Color> lightBtnSecStrk = {
|
||||
AccentColor.filc: const Color(0xFFCEDBF5),
|
||||
};
|
||||
Map<AccentColor, Color> lightBg = {
|
||||
AccentColor.filc: const Color(0xFFDAE4F7),
|
||||
};
|
||||
Map<AccentColor, Color> lightCard = {
|
||||
AccentColor.filc: const Color(0xFFEDF3FF),
|
||||
};
|
||||
Map<AccentColor, Color> lightBtnSec = {
|
||||
AccentColor.filc: const Color(0xFFFBFCFF),
|
||||
};
|
||||
|
||||
Map<AccentColor, Color> darkPrimary = {
|
||||
AccentColor.filc: const Color(0xFFEBF1FD),
|
||||
};
|
||||
Map<AccentColor, Color> darkSecondary = {
|
||||
AccentColor.filc: const Color(0xFFCFD8E9),
|
||||
};
|
||||
Map<AccentColor, Color> darkTeritary = {
|
||||
AccentColor.filc: const Color(0xFFAEC8FC),
|
||||
};
|
||||
Map<AccentColor, Color> darkIcon = {
|
||||
AccentColor.filc: const Color(0xFFBAD1FF),
|
||||
};
|
||||
Map<AccentColor, Color> darkAccent = {
|
||||
AccentColor.filc: const Color(0xFF487DE6),
|
||||
};
|
||||
Map<AccentColor, Color> darkBgDarkened = {
|
||||
AccentColor.filc: const Color(0xFF010205),
|
||||
};
|
||||
Map<AccentColor, Color> darkBtnSecStrk = {
|
||||
AccentColor.filc: const Color(0xFF1C2230),
|
||||
};
|
||||
Map<AccentColor, Color> darkBg = {
|
||||
AccentColor.filc: const Color(0xFF070A0E),
|
||||
};
|
||||
Map<AccentColor, Color> darkCard = {
|
||||
AccentColor.filc: const Color(0xFF0F131B),
|
||||
};
|
||||
Map<AccentColor, Color> darkBtnSec = {
|
||||
AccentColor.filc: const Color(0xFF131822),
|
||||
};
|
||||
|
||||
73
refilc/lib/theme/colors/new_colors.dart
Normal file
73
refilc/lib/theme/colors/new_colors.dart
Normal file
@@ -0,0 +1,73 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class NewColors extends ThemeExtension<NewColors> {
|
||||
const NewColors({
|
||||
required this.accent,
|
||||
required this.primary,
|
||||
required this.secondary,
|
||||
required this.teritary,
|
||||
required this.icon,
|
||||
required this.darkenBg,
|
||||
required this.btnSecStrk,
|
||||
required this.background,
|
||||
required this.card,
|
||||
required this.btnSec,
|
||||
});
|
||||
|
||||
final Color? accent;
|
||||
final Color? primary;
|
||||
final Color? secondary;
|
||||
final Color? teritary;
|
||||
final Color? icon;
|
||||
final Color? darkenBg;
|
||||
final Color? btnSecStrk;
|
||||
final Color? background;
|
||||
final Color? card;
|
||||
final Color? btnSec;
|
||||
|
||||
@override
|
||||
NewColors copyWith({
|
||||
Color? accent,
|
||||
Color? primary,
|
||||
Color? secondary,
|
||||
Color? teritary,
|
||||
Color? icon,
|
||||
Color? darkenBg,
|
||||
Color? btnSecStrk,
|
||||
Color? background,
|
||||
Color? card,
|
||||
Color? btnSec,
|
||||
}) {
|
||||
return NewColors(
|
||||
accent: accent ?? this.accent,
|
||||
primary: primary ?? this.primary,
|
||||
secondary: secondary ?? this.secondary,
|
||||
teritary: teritary ?? this.teritary,
|
||||
icon: icon ?? this.icon,
|
||||
darkenBg: darkenBg ?? this.darkenBg,
|
||||
btnSecStrk: btnSecStrk ?? this.btnSecStrk,
|
||||
background: background ?? this.background,
|
||||
card: card ?? this.card,
|
||||
btnSec: btnSec ?? this.btnSec,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
NewColors lerp(NewColors? other, double t) {
|
||||
if (other is! NewColors) {
|
||||
return this;
|
||||
}
|
||||
return NewColors(
|
||||
accent: Color.lerp(accent, other.accent, t),
|
||||
primary: Color.lerp(primary, other.primary, t),
|
||||
secondary: Color.lerp(secondary, other.secondary, t),
|
||||
teritary: Color.lerp(teritary, other.teritary, t),
|
||||
icon: Color.lerp(icon, other.icon, t),
|
||||
darkenBg: Color.lerp(darkenBg, other.darkenBg, t),
|
||||
btnSecStrk: Color.lerp(btnSecStrk, other.btnSecStrk, t),
|
||||
background: Color.lerp(background, other.background, t),
|
||||
card: Color.lerp(card, other.card, t),
|
||||
btnSec: Color.lerp(btnSec, other.btnSec, t),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:refilc/models/settings.dart';
|
||||
import 'package:refilc/theme/colors/accent.dart';
|
||||
import 'package:refilc/theme/colors/colors.dart';
|
||||
import 'package:refilc/theme/colors/new_colors.dart';
|
||||
import 'package:refilc/theme/colors/utils.dart';
|
||||
import 'package:refilc/theme/observer.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -87,6 +88,20 @@ class AppTheme {
|
||||
amount: 0.4); // white mode: same tertiary as secondary
|
||||
|
||||
return ThemeData(
|
||||
// extensions: [
|
||||
// NewColors(
|
||||
// accent: lightAccent[accentColor]!,
|
||||
// primary: lightPrimary[accentColor]!,
|
||||
// secondary: lightSecondary[accentColor]!,
|
||||
// teritary: lightTeritary[accentColor]!,
|
||||
// icon: lightIcon[accentColor]!,
|
||||
// darkenBg: lightBgDarkened[accentColor]!,
|
||||
// btnSecStrk: lightBtnSecStrk[accentColor]!,
|
||||
// background: lightBg[accentColor]!,
|
||||
// card: lightCard[accentColor]!,
|
||||
// btnSec: lightBtnSec[accentColor]!,
|
||||
// ),
|
||||
// ],
|
||||
brightness: Brightness.light,
|
||||
useMaterial3: true,
|
||||
fontFamily: _defaultFontFamily,
|
||||
@@ -198,6 +213,20 @@ class AppTheme {
|
||||
amount: 0.1); // dark mode: tertiary is way darker than secondary
|
||||
|
||||
return ThemeData(
|
||||
// extensions: [
|
||||
// NewColors(
|
||||
// accent: darkAccent[accentColor]!,
|
||||
// primary: darkPrimary[accentColor]!,
|
||||
// secondary: darkSecondary[accentColor]!,
|
||||
// teritary: darkTeritary[accentColor]!,
|
||||
// icon: darkIcon[accentColor]!,
|
||||
// darkenBg: darkBgDarkened[accentColor]!,
|
||||
// btnSecStrk: darkBtnSecStrk[accentColor]!,
|
||||
// background: darkBg[accentColor]!,
|
||||
// card: darkCard[accentColor]!,
|
||||
// btnSec: darkBtnSec[accentColor]!,
|
||||
// ),
|
||||
// ],
|
||||
brightness: Brightness.dark,
|
||||
useMaterial3: true,
|
||||
fontFamily: _defaultFontFamily,
|
||||
|
||||
Reference in New Issue
Block a user