createSearchShellRoute static method

ShellRoute createSearchShellRoute({
  1. required Widget builder(
    1. BuildContext,
    2. GoRouterState,
    3. Widget
    ),
  2. List<RouteBase>? routes,
})

Creates a ShellRoute for search with a persistent navigation bar.

This is useful for apps with bottom navigation where search should be one of the main tabs.

Implementation

static ShellRoute createSearchShellRoute({
  required Widget Function(BuildContext, GoRouterState, Widget) builder,
  List<RouteBase>? routes,
}) {
  return ShellRoute(
    builder: builder,
    routes: routes ?? [createSearchRoute()],
  );
}