simplified code across the app and consolidated duplicated helpers
This commit is contained in:
@@ -71,20 +71,16 @@ class MarianumDatesView extends StatelessWidget {
|
||||
IconButton(
|
||||
tooltip: 'Suchen',
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () {
|
||||
final events = bloc.getEvents() ?? const <MarianumDate>[];
|
||||
showSearch(
|
||||
context: context,
|
||||
delegate: SearchMarianumDates(events),
|
||||
);
|
||||
},
|
||||
onPressed: () => showSearch(
|
||||
context: context,
|
||||
delegate: SearchMarianumDates(bloc.getEvents()),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: LoadableStateConsumer<MarianumDatesBloc, MarianumDatesState>(
|
||||
child: (state, loading) {
|
||||
final events = bloc.getEvents() ?? const <MarianumDate>[];
|
||||
final groups = _groupByMonth(events);
|
||||
final groups = _groupByMonth(bloc.getEvents());
|
||||
|
||||
if (groups.isEmpty) {
|
||||
return const PlaceholderView(
|
||||
|
||||
Reference in New Issue
Block a user