drawerWhenBottomWithDrawerGroupDestinations function
List<AdaptiveGroupDestination>
drawerWhenBottomWithDrawerGroupDestinations(
- List<
AdaptiveGroupDestination> groupDestinations
Implementation
List<AdaptiveGroupDestination> drawerWhenBottomWithDrawerGroupDestinations(
List<AdaptiveGroupDestination> groupDestinations) {
return groupDestinations
.map((group) {
List<AdaptiveDestination> filteredDestinations = group.destinations
.where(
(destination) => destination.showOnDrawerWhenBottomWithDrawer)
.toList();
return AdaptiveGroupDestination(
name: group.name, destinations: filteredDestinations);
})
.where((group) => group.destinations.isNotEmpty)
.toList();
}