mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
When adding exercises only one is added
This commit is contained in:
@@ -376,25 +376,18 @@ class ExerciseAddWidget extends ConsumerWidget {
|
||||
padding: const EdgeInsets.all(5),
|
||||
child: Column(
|
||||
children: [
|
||||
...page.exercises.map((e) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
ExerciseAutocompleter(
|
||||
onExerciseSelected: (exercise) {
|
||||
gymProvider.addExerciseAfterPage(
|
||||
page.uuid,
|
||||
newExercise: exercise,
|
||||
);
|
||||
onDone?.call();
|
||||
_logger.fine('Added exercise ${exercise.id} after page $pageUUID');
|
||||
},
|
||||
),
|
||||
const Icon(Icons.arrow_downward),
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
);
|
||||
}),
|
||||
ExerciseAutocompleter(
|
||||
onExerciseSelected: (exercise) {
|
||||
gymProvider.addExerciseAfterPage(
|
||||
page.uuid,
|
||||
newExercise: exercise,
|
||||
);
|
||||
onDone?.call();
|
||||
_logger.fine('Added exercise ${exercise.id} after page $pageUUID');
|
||||
},
|
||||
),
|
||||
const Icon(Icons.arrow_downward),
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user