simplify: dedupe boilerplate and remove dead code across all layers
This commit is contained in:
@@ -27,7 +27,7 @@ class MarianumDatesView extends StatelessWidget {
|
||||
return keys.map((key) {
|
||||
final first = byMonth[key]!.first.start;
|
||||
final label = first.formatMonthYear().toUpperCase();
|
||||
return _MonthGroup(key: key, label: label, events: byMonth[key]!);
|
||||
return _MonthGroup(label: label, events: byMonth[key]!);
|
||||
}).toList();
|
||||
}
|
||||
|
||||
@@ -117,8 +117,7 @@ class MarianumDatesView extends StatelessWidget {
|
||||
}
|
||||
|
||||
class _MonthGroup {
|
||||
final String key;
|
||||
final String label;
|
||||
final List<MarianumDate> events;
|
||||
_MonthGroup({required this.key, required this.label, required this.events});
|
||||
_MonthGroup({required this.label, required this.events});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user