FluentNavigation constructor

FluentNavigation({
  1. Key? key,
  2. required List<AdaptiveGroupDestination> groupDestinations,
  3. required bool showOnlyModalNavigationDrawerOnDesktop,
  4. required bool showOnlyNavigationRailOnDesktop,
})

Implementation

FluentNavigation(
    {super.key,
    required this.groupDestinations,
    required this.showOnlyModalNavigationDrawerOnDesktop,
    required this.showOnlyNavigationRailOnDesktop})
    : assert(
        groupDestinations
                .expand((group) => group.destinations)
                .where(
                    (destination) => destination.showOnDrawerSidebar == true)
                .length >=
            2,
        'There must be at least 2 AdaptiveDestinations with showOnDrawerSidebar = true',
      ),
      assert(showOnlyModalNavigationDrawerOnDesktop == false ||
          showOnlyNavigationRailOnDesktop == false);