pageBuilder property

GoRouterPageBuilder? pageBuilder
final

A page builder for this route.

Typically a MaterialPage, as in:

GoRoute(
  path: '/',
  pageBuilder: (BuildContext context, GoRouterState state) => MaterialPage<void>(
    key: state.pageKey,
    child: HomePage(families: Families.data),
  ),
),

You can also use CupertinoPage, and for a custom page builder to use custom page transitions, you can use CustomTransitionPage.

Implementation

final GoRouterPageBuilder? pageBuilder;