added things to db and theme share

This commit is contained in:
Kima 2023-10-12 19:14:40 +02:00
parent 600bf7d763
commit 46e6120af3
2 changed files with 8 additions and 1 deletions

View File

@ -15,7 +15,8 @@ const settingsDB = DatabaseStruct("settings", {
"accent_color": int, "news": int, "seen_news": String,
"developer_mode": int,
"update_channel": int, "config": String, "custom_accent_color": int,
"custom_background_color": int, "custom_highlight_color": int, // general
"custom_background_color": int, "custom_highlight_color": int,
"custom_icon_color": int, "shadow_effect": int, // general
"grade_color1": int, "grade_color2": int, "grade_color3": int,
"grade_color4": int, "grade_color5": int, // grade colors
"vibration_strength": int, "ab_weeks": int, "swap_ab_weeks": int,

View File

@ -8,6 +8,8 @@ class SharedTheme {
Color backgroundColor;
Color panelsColor;
Color accentColor;
Color iconColor;
bool shadowEffect;
SharedGradeColors gradeColors;
SharedTheme({
@ -18,6 +20,8 @@ class SharedTheme {
required this.backgroundColor,
required this.panelsColor,
required this.accentColor,
required this.iconColor,
required this.shadowEffect,
required this.gradeColors,
});
@ -30,6 +34,8 @@ class SharedTheme {
backgroundColor: Color(json['background_color']),
panelsColor: Color(json['panels_color']),
accentColor: Color(json['accent_color']),
iconColor: Color(json['icon_color']),
shadowEffect: json['shadow_effect'] ?? true,
gradeColors: gradeColors,
);
}