buildState method

  1. @override
GoRouterState buildState(
  1. RouteConfiguration configuration,
  2. RouteMatchList matches, {
  3. required Map<String, dynamic> metadata,
})
override

Gets the state that represent this route match.

Implementation

@override
GoRouterState buildState(
  RouteConfiguration configuration,
  RouteMatchList matches, {
  required Map<String, dynamic> metadata,
}) {
  return GoRouterState(
    configuration,
    uri: this.matches.uri,
    matchedLocation: matchedLocation,
    fullPath: this.matches.fullPath,
    pathParameters: this.matches.pathParameters,
    pageKey: pageKey,
    name: route.name,
    path: route.path,
    extra: this.matches.extra,
    topRoute: this.matches.lastOrNull?.route,
    metadata: metadata,
  );
}