group static method

Widget group({
  1. NavigatorStackControl? control,
  2. required List<NavigatorStack> items,
  3. StackGroupBuilder? builder,
  4. bool overrideNavigation = true,
})

Creates new Navigator and all underling Widgets will be pushed to this stack. With overrideNavigation Widget will create WillPopScope and handles back button.

NavigatorStack.group - Multiple NavigatorStacks in Stack. Only selected Controllers are visible - Offstage. Typically just one page is visible - usable with BottomNavigationBar to preserve navigation of separated pages. NavigatorStack.menu - Simplified version of NavigatorStack.group, can be used if access to NavigatorControls is not required.

NavigatorStackControl is used to navigate between multiple NavigatorStacks.

NavigatorStack

Implementation

static Widget group({
  NavigatorStackControl? control,
  required List<NavigatorStack> items,
  StackGroupBuilder? builder,
  bool overrideNavigation = true,
}) {
  return NavigatorStackGroup(
    control: control ?? NavigatorStackControl(),
    items: items,
    builder: builder,
    overrideNavigation: overrideNavigation,
  );
}