mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Make more obvious that exercises are added together into a superset
Closes #56
This commit is contained in:
@@ -108,6 +108,10 @@
|
||||
"@searchExercise": {
|
||||
"description": "Label on set form. Selected exercises are added to the set"
|
||||
},
|
||||
"supersetWith": "superset with",
|
||||
"@supersetWith": {
|
||||
"description": "Text used between exercise cards when adding a new set. Translate as something like 'in a superset with'"
|
||||
},
|
||||
"equipment": "Equipment",
|
||||
"@equipment": {
|
||||
"description": "Equipment needed to perform an exercise"
|
||||
|
||||
@@ -440,16 +440,34 @@ class _SetFormWidgetState extends State<SetFormWidget> {
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
...widget._set.exercisesObj.map((exercise) {
|
||||
...widget._set.exercisesObj.asMap().entries.map((entry) {
|
||||
final index = entry.key;
|
||||
final exercise = entry.value;
|
||||
final showSupersetInfo = (index + 1) < widget._set.exercisesObj.length;
|
||||
final settings =
|
||||
widget._set.settings.where((e) => e.exerciseObj.id == exercise.id).toList();
|
||||
|
||||
return ExerciseSetting(
|
||||
exercise,
|
||||
settings,
|
||||
_detailed,
|
||||
_currentSetSliderValue,
|
||||
removeExercise,
|
||||
return Column(
|
||||
children: [
|
||||
ExerciseSetting(
|
||||
exercise,
|
||||
settings,
|
||||
_detailed,
|
||||
_currentSetSliderValue,
|
||||
removeExercise,
|
||||
),
|
||||
if (showSupersetInfo)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(3.0),
|
||||
child: Text('+'),
|
||||
),
|
||||
if (showSupersetInfo) Text(AppLocalizations.of(context).supersetWith),
|
||||
if (showSupersetInfo)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(3.0),
|
||||
child: Text('+'),
|
||||
),
|
||||
],
|
||||
);
|
||||
}).toList(),
|
||||
ElevatedButton(
|
||||
|
||||
Reference in New Issue
Block a user