From 68131935f2d1f341c044ca632910f3a61a4940f1 Mon Sep 17 00:00:00 2001 From: Felix Holz Date: Tue, 27 Feb 2024 20:28:04 +0100 Subject: [PATCH] add red color theme and increase price --- lib/screens/add_progress_screen.dart | 2 +- lib/screens/purchase_screen.dart | 5 +- lib/theme/frederic_theme.dart | 96 ++++++++++++++++++- .../frederic_action_dialog.dart | 2 +- 4 files changed, 97 insertions(+), 8 deletions(-) diff --git a/lib/screens/add_progress_screen.dart b/lib/screens/add_progress_screen.dart index 6a058ea..ae09921 100644 --- a/lib/screens/add_progress_screen.dart +++ b/lib/screens/add_progress_screen.dart @@ -105,7 +105,7 @@ class _AddProgressScreenState extends State { next.hasChanged(widget.activity.id), builder: (context, setListData) { List sets = - setListData[widget.activity.id].getLatestSets(0, 3); + setListData[widget.activity.id].getLatestSets(0, 4); if (sets.isEmpty) { controller.setRepsAndWeight(RepsWeightSuggestion( widget.activity.recommendedReps, 30)); diff --git a/lib/screens/purchase_screen.dart b/lib/screens/purchase_screen.dart index 932eb0b..1d408d4 100644 --- a/lib/screens/purchase_screen.dart +++ b/lib/screens/purchase_screen.dart @@ -11,8 +11,8 @@ import 'package:frederic/widgets/standard_elements/frederic_scaffold.dart'; class PurchaseScreen extends StatelessWidget { const PurchaseScreen({Key? key}) : super(key: key); - final String normalPrice = "6,99"; - final String discountPrice = '4,99'; + final String normalPrice = "13,99"; + final String discountPrice = '11,99'; final String discount = "2"; @override @@ -29,7 +29,6 @@ class PurchaseScreen extends StatelessWidget { .showPurchaseSuccessfulToast(context); }); } - return WillPopScope( onWillPop: () async => !(user.tempPurchaseIsPending ?? false), child: Container( diff --git a/lib/theme/frederic_theme.dart b/lib/theme/frederic_theme.dart index 8c9059b..f96a71e 100644 --- a/lib/theme/frederic_theme.dart +++ b/lib/theme/frederic_theme.dart @@ -64,8 +64,8 @@ class FredericColorTheme { this.negativeColor = Colors.red, this.negativeColorLight = const Color(0x1AB71C1C), this.dividerColor = const Color(0xFFC9C9C9), - this.backgroundColor = const Color(0xFF131313), - this.cardBackgroundColor = const Color(0xFF1F1F1F), + this.backgroundColor = const Color(0xFF1E1E1E), + this.cardBackgroundColor = const Color(0xFF2B2B2B), this.greyColor = const Color(0xFFC4C4C4), this.disabledGreyColor = const Color(0x66A5A5A5), this.textColor = Colors.white, @@ -358,6 +358,81 @@ class FredericColorTheme { this.cardBorderColor = Colors.transparent; } + FredericColorTheme.red( + {this.name = "Hot Rod Red", + this.uid = 14, + this.mainColor = const Color(0xFFAA0505), + this.mainColorInText = const Color(0xFFAA0505), + this.mainColorLight = const Color(0x1AAA0505), + this.accentColor = const Color(0xFFB97D10), + this.accentColorLight = const Color(0x1AB97D10), + this.positiveColor = const Color(0xFF1CBB3F), + this.positiveColorLight = const Color(0x1A1CBB3F), + this.negativeColor = const Color(0xFF6A0C0B), + this.negativeColorLight = const Color(0x1A6A0C0B), + this.dividerColor = const Color(0xFFC9C9C9), + this.backgroundColor = Colors.white, + this.cardBackgroundColor = Colors.white, + this.greyColor = const Color(0xFFC4C4C4), + this.disabledGreyColor = const Color(0x66A5A5A5), + this.textColor = const Color(0xFF272727), + this.textColorBright = Colors.white, + this.textColorColorfulBackground = const Color(0xFF272727), + this.isDark = false, + this.isColorful = false, + this.greyTextColor = const Color(0xBF3A3A3A), + this.cardBorderColor = const Color(0xFFE2E2E2)}); + + FredericColorTheme.redColorful( + {this.name = "Hot Rod Red Colorful", + this.uid = 15, + this.mainColor = const Color(0xFFAA0505), + this.mainColorInText = const Color(0xFFAA0505), + this.mainColorLight = const Color(0x1AAA0505), + this.accentColor = const Color(0xFFB97D10), + this.accentColorLight = const Color(0x1AB97D10), + this.positiveColor = const Color(0xFF1CBB3F), + this.positiveColorLight = const Color(0x1A1CBB3F), + this.negativeColor = const Color(0xFF6A0C0B), + this.negativeColorLight = const Color(0x1A6A0C0B), + this.dividerColor = const Color(0xFFC9C9C9), + this.backgroundColor = Colors.white, + this.cardBackgroundColor = Colors.white, + this.greyColor = const Color(0xFFC4C4C4), + this.disabledGreyColor = const Color(0x66A5A5A5), + this.textColor = const Color(0xFF272727), + this.textColorBright = Colors.white, + this.textColorColorfulBackground = Colors.white, + this.isDark = false, + this.isColorful = true, + this.greyTextColor = const Color(0xBF3A3A3A), + this.cardBorderColor = const Color(0xFFE2E2E2)}); + + FredericColorTheme.redDark( + {this.name = "Hot Rod Red Dark", + this.uid = 16, + this.mainColor = const Color(0xFFAA0505), + this.mainColorInText = const Color(0xFFD11616), + this.mainColorLight = const Color(0x1AAA0505), + this.accentColor = const Color(0xFFB97D10), + this.accentColorLight = const Color(0x1AB97D10), + this.positiveColor = const Color(0xFF1CBB3F), + this.positiveColorLight = const Color(0x1A1CBB3F), + this.negativeColor = const Color(0xFF6A0C0B), + this.negativeColorLight = const Color(0x1A6A0C0B), + this.dividerColor = const Color(0xFFC9C9C9), + this.backgroundColor = const Color(0xFF1F1F1F), + this.cardBackgroundColor = const Color(0xFF282828), + this.greyColor = const Color(0xFFC4C4C4), + this.disabledGreyColor = const Color(0x66A5A5A5), + this.textColor = Colors.white, + this.textColorBright = Colors.black, + this.textColorColorfulBackground = Colors.white, + this.isDark = true, + this.isColorful = true, + this.greyTextColor = const Color(0xFFC4C4C4), + this.cardBorderColor = Colors.transparent}); + static FredericColorTheme find(int id) { switch (id) { case 1: @@ -425,6 +500,21 @@ class FredericColorTheme { assert(theme.uid == id, 'Color theme UIDs not matching! [${theme.uid} != $id]'); return theme; + case 14: + FredericColorTheme theme = FredericColorTheme.red(); + assert(theme.uid == id, + 'Color theme UIDs not matching! [${theme.uid} != $id]'); + return theme; + case 15: + FredericColorTheme theme = FredericColorTheme.redColorful(); + assert(theme.uid == id, + 'Color theme UIDs not matching! [${theme.uid} != $id]'); + return theme; + case 16: + FredericColorTheme theme = FredericColorTheme.redDark(); + assert(theme.uid == id, + 'Color theme UIDs not matching! [${theme.uid} != $id]'); + return theme; } return FredericColorTheme.blue(); } @@ -433,7 +523,7 @@ class FredericColorTheme { static List get allThemes { if (_allThemes.isEmpty) { - for (int i = 1; i <= 13; i++) { + for (int i = 1; i <= 16; i++) { _allThemes.add(find(i)); } } diff --git a/lib/widgets/standard_elements/frederic_action_dialog.dart b/lib/widgets/standard_elements/frederic_action_dialog.dart index d8d46f5..fa2dd73 100644 --- a/lib/widgets/standard_elements/frederic_action_dialog.dart +++ b/lib/widgets/standard_elements/frederic_action_dialog.dart @@ -102,7 +102,7 @@ class FredericActionDialog extends StatelessWidget { } }, mainColor: destructiveAction - ? Colors.red + ? theme.negativeColor : theme.mainColor, )), ),