PageRouteInfo<T extends Object?>.fromMatch constructor

PageRouteInfo<T extends Object?>.fromMatch(
  1. RouteMatch match
)

Creates a new instance form RouteMatch

Implementation

factory PageRouteInfo.fromMatch(RouteMatch match) {
  return PageRouteInfo(
    match.name,
    rawPathParams: match.params.rawMap,
    rawQueryParams: match.queryParams.rawMap,
    fragment: match.fragment,
    redirectedFrom: match.redirectedFrom,
    stringMatch: match.stringMatch,
    args: match.args,
    initialChildren: match.children
        ?.map(
          (m) => PageRouteInfo.fromMatch(m),
        )
        .toList(),
  );
}