Skip to content

Commit dcc3857

Browse files
committed
Dodo theme and small fixes
1 parent 6186894 commit dcc3857

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed
49.6 KB
Loading
49.6 KB
Loading

lib/components/helpers/background_paint.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class BackgroundPaint extends HookWidget {
1515
@override
1616
Widget build(BuildContext context) {
1717
final appThemeState = context.watch<AppThemeState>();
18-
final backgroundImages = AppTheme.backgroundImages[appThemeState.themeName]!;
18+
final backgroundImages = AppTheme.backgroundImages[appThemeState.themeName] ?? [];
1919
final paintIndex = useState(Random().nextInt(5));
2020
return backgroundImages.isEmpty
2121
? child

lib/helpers/app_theme.dart

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ enum ThemeName {
6464
greenRedLight(Brightness.light, ThemeType.dualColor, 'greenRedLight'),
6565
greenRedDark(Brightness.dark, ThemeType.dualColor, 'greenRedDark'),
6666
dogDark(Brightness.dark, ThemeType.background, 'dogDarkTheme', emoji: '🐶'),
67-
dogLight(Brightness.light, ThemeType.background, 'dogLightTheme', emoji: '🐶');
67+
dogLight(Brightness.light, ThemeType.background, 'dogLightTheme', emoji: '🐶'),
68+
dodoBackgroundLight(Brightness.light, ThemeType.background, 'dodoBackgroundLightTheme', emoji: '🦤'),
69+
dodoBackgroundDark(Brightness.dark, ThemeType.background, 'dodoBackgroundDarkTheme', emoji: '🦤');
6870

6971
const ThemeName(this.brightness, this.type, this.storageName, {String? counterPart, this.emoji})
7072
: _counterPart = counterPart;
@@ -105,7 +107,10 @@ enum ThemeName {
105107
}
106108

107109
bool isDodo() {
108-
return this == ThemeName.dodoLight || this == ThemeName.dodoDark;
110+
return this == ThemeName.dodoLight ||
111+
this == ThemeName.dodoDark ||
112+
this == ThemeName.dodoBackgroundLight ||
113+
this == ThemeName.dodoBackgroundDark;
109114
}
110115

111116
bool isDog() {
@@ -172,6 +177,8 @@ class AppTheme {
172177
generateThemeData(ThemeName.greenRedDark, Color(0xffffb4a7)),
173178
generateThemeData(ThemeName.dogLight, Colors.amber[700]!),
174179
generateThemeData(ThemeName.dogDark, Colors.amber[600]!),
180+
generateThemeData(ThemeName.dodoBackgroundLight, Color.fromARGB(255, 19, 152, 181)),
181+
generateThemeData(ThemeName.dodoBackgroundDark, Color.fromARGB(255, 19, 152, 181)),
175182
]);
176183

177184
static Map<ThemeName, List<Color>> gradientColors = {
@@ -446,15 +453,15 @@ class AppTheme {
446453
onSecondaryContainer: Color(0xffffdad8),
447454
);
448455
break;
449-
case ThemeName.dodoLight:
456+
case ThemeName.dodoLight || ThemeName.dodoBackgroundLight:
450457
newColorScheme = colorScheme.copyWith(
451458
primary: Color.fromARGB(255, 19, 152, 181),
452459
secondary: Color.fromARGB(255, 247, 192, 0),
453460
secondaryContainer: Color.fromARGB(255, 255, 223, 149),
454461
onSecondaryContainer: Color.fromARGB(255, 37, 26, 0),
455462
);
456463
break;
457-
case ThemeName.dodoDark:
464+
case ThemeName.dodoDark || ThemeName.dodoBackgroundDark:
458465
newColorScheme = colorScheme.copyWith(
459466
primary: Color.fromARGB(255, 88, 214, 247),
460467
onPrimary: Color.fromARGB(255, 0, 54, 66),

pubspec.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: Csocsort
1212
# Read more about iOS versioning at
1313
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1414

15-
version: 4.4.7+5133 # 5 is the number of an appbundle, the digits after is the version number
15+
version: 4.5.0+5134 # 5 is the number of an appbundle, the digits after is the version number
1616

1717
environment:
1818
sdk: '>=3.0.0'
@@ -85,6 +85,8 @@ flutter:
8585
- assets/translations/
8686
- assets/images/dogLightTheme/
8787
- assets/images/dogDarkTheme/
88+
- assets/images/dodoBackgroundLightTheme/
89+
- assets/images/dodoBackgroundDarkTheme/
8890

8991
msix_config:
9092
display_name: Dodo - secure bill splitting

0 commit comments

Comments
 (0)