Render the "add day" within a Card

This makes it visually more similar to the rest of the options
This commit is contained in:
Roland Geider
2025-03-14 15:16:21 +01:00
parent 498e0a5011
commit 8de2199742

View File

@@ -123,28 +123,25 @@ class _ReorderableDaysListState extends State<ReorderableDaysList> {
provider.editDays(widget.days, refresh: true);
},
),
ListTile(
key: const ValueKey('add-day'),
// tileColor: Theme.of(context).highlightColor,
leading: const Icon(Icons.add),
title: Text(
AppLocalizations.of(context).newDay,
style: Theme.of(context).textTheme.titleMedium,
Card(
child: ListTile(
key: const ValueKey('add-day'),
// tileColor: Theme.of(context).focusColor,
leading: const Icon(Icons.add),
title: Text(
AppLocalizations.of(context).newDay,
style: Theme.of(context).textTheme.titleMedium,
),
onTap: () async {
final day = Day.empty();
day.name = '${i18n.newDay} ${widget.days.length + 1}';
day.routineId = widget.routineId;
day.order = widget.days.length + 1;
final newDay = await provider.addDay(day, refresh: true);
widget.onDaySelected(newDay.id!);
},
),
onTap: () async {
final day = Day.empty();
day.name = '${i18n.newDay} ${widget.days.length + 1}';
day.routineId = widget.routineId;
day.order = widget.days.length + 1;
final newDay = await provider.addDay(day, refresh: true);
// final newSlot = await provider.addSlot(Slot.withData(
// day: newDay.id,
// order: 1,
// ));
widget.onDaySelected(newDay.id!);
},
),
],
);