upgraded dart and packages, analyze fixes, action type timer management

This commit is contained in:
Joshua Burman
2024-12-07 13:13:45 -05:00
parent 19f835d8f2
commit f781001d3b
11 changed files with 104 additions and 182 deletions

View File

@ -18,12 +18,14 @@ class ActivityAction {
List<List<Map<String, dynamic>>> items() {
List<List<Map<String, dynamic>>> sets = [];
Reps reps = activityActionSet.reps;
int totalActions = 1;
for (int i = 0; i < activityActionSet.total; i++) {
List<Map<String, dynamic>> actions = [];
int? weight = _setWeight(i);
actions.add({
'actionID': totalActions++,
'name': title,
'type': reps.type,
'amount': reps.amounts[i],
@ -33,6 +35,7 @@ class ActivityAction {
if (activityActionSet.type == 'alternating') {
if (reps.rest != null) {
actions.add({
'actionID': totalActions++,
'name': 'Rest',
'type': 'seconds',
'amount': reps.amounts[i],
@ -40,6 +43,7 @@ class ActivityAction {
}
actions.add({
'actionID': totalActions++,
'name': title,
'type': reps.type,
'amount': reps.amounts[i],
@ -48,6 +52,7 @@ class ActivityAction {
}
actions.add({
'actionID': totalActions++,
'name': 'Rest',
'type': 'seconds',
'amount': activityActionSet.rest ~/ 1000,