buildState method
Gets the state that represent this route match.
Implementation
@override
GoRouterState buildState(
RouteConfiguration configuration, RouteMatchList matches) {
// The route related data is stored in the leaf route match.
final RouteMatch leafMatch = _lastLeaf;
if (leafMatch is ImperativeRouteMatch) {
matches = leafMatch.matches;
}
return GoRouterState(
configuration,
uri: matches.uri,
matchedLocation: matchedLocation,
fullPath: matches.fullPath,
pathParameters: matches.pathParameters,
pageKey: pageKey,
extra: matches.extra,
topRoute: matches.lastOrNull?.route,
);
}