Skip to content

Commit

Permalink
add red color theme and increase price
Browse files Browse the repository at this point in the history
  • Loading branch information
NeXTormer committed Feb 27, 2024
1 parent 926dba2 commit 6813193
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/screens/add_progress_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class _AddProgressScreenState extends State<AddProgressScreen> {
next.hasChanged(widget.activity.id),
builder: (context, setListData) {
List<FredericSet> 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));
Expand Down
5 changes: 2 additions & 3 deletions lib/screens/purchase_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,7 +29,6 @@ class PurchaseScreen extends StatelessWidget {
.showPurchaseSuccessfulToast(context);
});
}

return WillPopScope(
onWillPop: () async => !(user.tempPurchaseIsPending ?? false),
child: Container(
Expand Down
96 changes: 93 additions & 3 deletions lib/theme/frederic_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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();
}
Expand All @@ -433,7 +523,7 @@ class FredericColorTheme {

static List<FredericColorTheme> get allThemes {
if (_allThemes.isEmpty) {
for (int i = 1; i <= 13; i++) {
for (int i = 1; i <= 16; i++) {
_allThemes.add(find(i));
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/standard_elements/frederic_action_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class FredericActionDialog extends StatelessWidget {
}
},
mainColor: destructiveAction
? Colors.red
? theme.negativeColor
: theme.mainColor,
)),
),
Expand Down

0 comments on commit 6813193

Please sign in to comment.