forked from firka/firka
ref: split core / grade themes up into multiple files
This commit is contained in:
67
firka_common/lib/ui/theme/core/firka.dart
Normal file
67
firka_common/lib/ui/theme/core/firka.dart
Normal file
@@ -0,0 +1,67 @@
|
||||
part of "../core_theme.dart";
|
||||
|
||||
const firkaCore = CoreTheme(
|
||||
id: "firka",
|
||||
light: CoreThemeColors(
|
||||
background: Color(0xFFFAFFF0),
|
||||
backgroundAmoled: Colors.black,
|
||||
background0p: Color(0x00fafff0),
|
||||
success: Color(0xFF92EA3B),
|
||||
shadowBlur: 2,
|
||||
textPrimary: Color(0xFF394C0A),
|
||||
textSecondary: Color(0xCC394C0A),
|
||||
textTertiary: Color(0x80394C0A),
|
||||
textTeritary: Color(0xFF97A474),
|
||||
textPrimaryLight: Color(0xFF394C0A),
|
||||
textSecondaryLight: Color(0xCC394C0A),
|
||||
textTertiaryLight: Color(0x80394C0A),
|
||||
card: Color(0xFFF3FBDE),
|
||||
cardTranslucent: Color(0x80F3FBDE),
|
||||
buttonSecondaryFill: Color(0xFFFEFFFD),
|
||||
buttonDisabledIcon: Color(0xFFCDD9B3),
|
||||
accent: Color(0xFFA7DC22),
|
||||
secondary: Color(0xFF6E8F1B),
|
||||
shadowColor: Color(0x33647e22),
|
||||
a10p: Color(0x1aa7dc22),
|
||||
a15p: Color(0x26a7dc22),
|
||||
warningAccent: Color(0xFFFFA046),
|
||||
warningText: Color(0xFF8F531B),
|
||||
warning15p: Color(0x26FFA046),
|
||||
warningCard: Color(0xFFFAEBDC),
|
||||
errorAccent: Color(0xFFFF54A1),
|
||||
errorText: Color(0xFF8F1B4F),
|
||||
error15p: Color(0x26FF54A1),
|
||||
errorCard: Color(0xFFFADCE9),
|
||||
),
|
||||
dark: CoreThemeColors(
|
||||
background: Color(0xFF0D1202),
|
||||
backgroundAmoled: Colors.black,
|
||||
background0p: Color(0x00fafff0),
|
||||
success: Color(0xFF92EA3B),
|
||||
shadowBlur: 0,
|
||||
textPrimary: Color(0xFFEAF7CC),
|
||||
textSecondary: Color(0xB3EAF7CC),
|
||||
textTertiary: Color(0x80EAF7CC),
|
||||
textTeritary: Color(0xFF97A474),
|
||||
textPrimaryLight: Color(0xFF394C0A),
|
||||
textSecondaryLight: Color(0xCC394C0A),
|
||||
textTertiaryLight: Color(0x80394C0A),
|
||||
card: Color(0xFF141905),
|
||||
cardTranslucent: Color(0x80141905),
|
||||
buttonSecondaryFill: Color(0xFF20290B),
|
||||
buttonDisabledIcon: Color(0xFF465422),
|
||||
accent: Color(0xFFA7DC22),
|
||||
secondary: Color(0xFFCBEE71),
|
||||
shadowColor: Color(0x26CBEE71),
|
||||
a10p: Color(0x1AA7DC22),
|
||||
a15p: Color(0x26A7DC22),
|
||||
warningAccent: Color(0xFFFFA046),
|
||||
warningText: Color(0xFFF0B37A),
|
||||
warning15p: Color(0x26FFA046),
|
||||
warningCard: Color(0xFF201203),
|
||||
errorAccent: Color(0xFFFF54A1),
|
||||
errorText: Color(0xFFF59EC5),
|
||||
error15p: Color(0x26FF54A1),
|
||||
errorCard: Color(0xFF1E030F),
|
||||
),
|
||||
);
|
||||
@@ -1,75 +1,11 @@
|
||||
import "package:flutter/material.dart";
|
||||
|
||||
part "core/firka.dart";
|
||||
|
||||
const Map<String, CoreTheme> coreThemes = {
|
||||
"firka": firkaCore,
|
||||
};
|
||||
|
||||
const firkaCore = CoreTheme(
|
||||
id: "firka",
|
||||
light: CoreThemeColors(
|
||||
background: Color(0xFFFAFFF0),
|
||||
backgroundAmoled: Colors.black,
|
||||
background0p: Color(0x00fafff0),
|
||||
success: Color(0xFF92EA3B),
|
||||
shadowBlur: 2,
|
||||
textPrimary: Color(0xFF394C0A),
|
||||
textSecondary: Color(0xCC394C0A),
|
||||
textTertiary: Color(0x80394C0A),
|
||||
textTeritary: Color(0xFF97A474),
|
||||
textPrimaryLight: Color(0xFF394C0A),
|
||||
textSecondaryLight: Color(0xCC394C0A),
|
||||
textTertiaryLight: Color(0x80394C0A),
|
||||
card: Color(0xFFF3FBDE),
|
||||
cardTranslucent: Color(0x80F3FBDE),
|
||||
buttonSecondaryFill: Color(0xFFFEFFFD),
|
||||
buttonDisabledIcon: Color(0xFFCDD9B3),
|
||||
accent: Color(0xFFA7DC22),
|
||||
secondary: Color(0xFF6E8F1B),
|
||||
shadowColor: Color(0x33647e22),
|
||||
a10p: Color(0x1aa7dc22),
|
||||
a15p: Color(0x26a7dc22),
|
||||
warningAccent: Color(0xFFFFA046),
|
||||
warningText: Color(0xFF8F531B),
|
||||
warning15p: Color(0x26FFA046),
|
||||
warningCard: Color(0xFFFAEBDC),
|
||||
errorAccent: Color(0xFFFF54A1),
|
||||
errorText: Color(0xFF8F1B4F),
|
||||
error15p: Color(0x26FF54A1),
|
||||
errorCard: Color(0xFFFADCE9),
|
||||
),
|
||||
dark: CoreThemeColors(
|
||||
background: Color(0xFF0D1202),
|
||||
backgroundAmoled: Colors.black,
|
||||
background0p: Color(0x00fafff0),
|
||||
success: Color(0xFF92EA3B),
|
||||
shadowBlur: 0,
|
||||
textPrimary: Color(0xFFEAF7CC),
|
||||
textSecondary: Color(0xB3EAF7CC),
|
||||
textTertiary: Color(0x80EAF7CC),
|
||||
textTeritary: Color(0xFF97A474),
|
||||
textPrimaryLight: Color(0xFF394C0A),
|
||||
textSecondaryLight: Color(0xCC394C0A),
|
||||
textTertiaryLight: Color(0x80394C0A),
|
||||
card: Color(0xFF141905),
|
||||
cardTranslucent: Color(0x80141905),
|
||||
buttonSecondaryFill: Color(0xFF20290B),
|
||||
buttonDisabledIcon: Color(0xFF465422),
|
||||
accent: Color(0xFFA7DC22),
|
||||
secondary: Color(0xFFCBEE71),
|
||||
shadowColor: Color(0x26CBEE71),
|
||||
a10p: Color(0x1AA7DC22),
|
||||
a15p: Color(0x26A7DC22),
|
||||
warningAccent: Color(0xFFFFA046),
|
||||
warningText: Color(0xFFF0B37A),
|
||||
warning15p: Color(0x26FFA046),
|
||||
warningCard: Color(0xFF201203),
|
||||
errorAccent: Color(0xFFFF54A1),
|
||||
errorText: Color(0xFFF59EC5),
|
||||
error15p: Color(0x26FF54A1),
|
||||
errorCard: Color(0xFF1E030F),
|
||||
),
|
||||
);
|
||||
|
||||
/// App chrome colors (everything except grade colors)
|
||||
class CoreThemeColors {
|
||||
final Color background;
|
||||
|
||||
15
firka_common/lib/ui/theme/grade/firka.dart
Normal file
15
firka_common/lib/ui/theme/grade/firka.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
part of "../grade_theme.dart";
|
||||
|
||||
const _firkaGradeColors = GradeThemeColors(
|
||||
grade5: Color(0xFF22CCAD),
|
||||
grade4: Color(0xFF92EA3B),
|
||||
grade3: Color(0xFFF9CF00),
|
||||
grade2: Color(0xFFFFA046),
|
||||
grade1: Color(0xFFFF54A1),
|
||||
);
|
||||
|
||||
const firkaGrade = GradeTheme(
|
||||
id: "firka",
|
||||
light: _firkaGradeColors,
|
||||
dark: _firkaGradeColors,
|
||||
);
|
||||
@@ -1,22 +1,6 @@
|
||||
import "package:flutter/material.dart";
|
||||
|
||||
const Map<String, GradeTheme> gradeThemes = {
|
||||
"firka": firkaGrade,
|
||||
};
|
||||
|
||||
const _firkaGradeColors = GradeThemeColors(
|
||||
grade5: Color(0xFF22CCAD),
|
||||
grade4: Color(0xFF92EA3B),
|
||||
grade3: Color(0xFFF9CF00),
|
||||
grade2: Color(0xFFFFA046),
|
||||
grade1: Color(0xFFFF54A1),
|
||||
);
|
||||
|
||||
const firkaGrade = GradeTheme(
|
||||
id: "firka",
|
||||
light: _firkaGradeColors,
|
||||
dark: _firkaGradeColors,
|
||||
);
|
||||
part "grade/firka.dart";
|
||||
|
||||
class GradeThemeColors {
|
||||
final Color grade5;
|
||||
@@ -48,4 +32,8 @@ class GradeTheme {
|
||||
GradeThemeColors forBrightness(bool isLight) => isLight ? light : dark;
|
||||
}
|
||||
|
||||
const Map<String, GradeTheme> gradeThemes = {
|
||||
"firka": firkaGrade,
|
||||
};
|
||||
|
||||
GradeTheme resolveGrade(String id) => gradeThemes[id] ?? firkaGrade;
|
||||
|
||||
Reference in New Issue
Block a user