path property

String path
final

The path of this go route.

For example:

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

The path also support path parameters. For a path: /family/:fid, it matches all URIs start with /family/..., e.g. /family/123, /family/456 and etc. The parameter values are stored in GoRouterState that are passed into pageBuilder and builder.

The query parameter are also capture during the route parsing and stored in GoRouterState.

See Query parameters and path parameters to learn more about parameters.

Implementation

final String path;