File tree Expand file tree Collapse file tree 1 file changed +24
-22
lines changed
lib/widgets/routines/forms Expand file tree Collapse file tree 1 file changed +24
-22
lines changed Original file line number Diff line number Diff line change @@ -574,29 +574,31 @@ class _SlotFormWidgetStateNg extends State<ReorderableSlotList> {
574574 },
575575 ),
576576 if (! widget.day.isRest)
577- ListTile (
578- leading: isAddingSlot ? const FormProgressIndicator () : const Icon (Icons .add),
579- title: Text (
580- i18n.addExercise,
581- style: Theme .of (context).textTheme.titleMedium,
577+ Card (
578+ child: ListTile (
579+ leading: isAddingSlot ? const FormProgressIndicator () : const Icon (Icons .add),
580+ title: Text (
581+ i18n.addExercise,
582+ style: Theme .of (context).textTheme.titleMedium,
583+ ),
584+ onTap: isAddingSlot
585+ ? null
586+ : () async {
587+ setState (() => isAddingSlot = true );
588+
589+ final newSlot = await provider.addSlot (
590+ Slot .withData (
591+ day: widget.day.id,
592+ order: widget.slots.length + 1 ,
593+ ),
594+ widget.day.routineId,
595+ );
596+ if (mounted) {
597+ setState (() => isAddingSlot = false );
598+ setState (() => selectedSlotId = newSlot.id);
599+ }
600+ },
582601 ),
583- onTap: isAddingSlot
584- ? null
585- : () async {
586- setState (() => isAddingSlot = true );
587-
588- final newSlot = await provider.addSlot (
589- Slot .withData (
590- day: widget.day.id,
591- order: widget.slots.length + 1 ,
592- ),
593- widget.day.routineId,
594- );
595- if (mounted) {
596- setState (() => isAddingSlot = false );
597- setState (() => selectedSlotId = newSlot.id);
598- }
599- },
600602 ),
601603 ],
602604 );
You can’t perform that action at this time.
0 commit comments