INNER CODE UNIT · Dart
_groupByCategory
maplibre/flutter-maplibre-gl · maplibre_gl_example/lib/main.dart:294
Map<ExampleCategory, List<ExamplePage>> _groupByCategory() {
final grouped = <ExampleCategory, List<ExamplePage>>{};
for (final page in _allPages) {
grouped.putIfAbsent(page.category, () => []).add(page);
}
return grouped;
}
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final groupedPages = _groupByCategory();
return Scaffold(
body: CustomScrollView(
slivers: [
const SliverAppBar.large(
title: Text('MapLibre Examples'),