mirror of
https://github.com/Iconica-Development/flutter_availability.git
synced 2025-05-19 05:03:44 +02:00
fix: remove empty days when updating a week template
This commit is contained in:
parent
3b51a7f31d
commit
8752e2f6cc
1 changed files with 4 additions and 6 deletions
|
@ -23,12 +23,10 @@ class WeekTemplateViewModel {
|
|||
name: template.name,
|
||||
color: template.color,
|
||||
data: {
|
||||
for (var day in WeekDay.values)
|
||||
day: data.data.containsKey(day)
|
||||
? DayTemplateDataViewModel.fromDayTemplateData(
|
||||
for (var day in WeekDay.values.where(data.data.containsKey))
|
||||
day: DayTemplateDataViewModel.fromDayTemplateData(
|
||||
data.data[day]!,
|
||||
)
|
||||
: const DayTemplateDataViewModel(),
|
||||
),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue