PageRouteInfo<T>.fromMatch constructor

PageRouteInfo<T>.fromMatch(
  1. RouteMatch match
)

Creates a new instance form RouteMatch

Implementation

factory PageRouteInfo.fromMatch(RouteMatch match) {
  return PageRouteInfo(
    match.name,
    rawPathParams: match.pathParams.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(),
  );
}