UrlState.fromSegments constructor

UrlState.fromSegments(
  1. List<RouteMatch> routes, {
  2. bool shouldReplace = false,
  3. Object? state,
})

Builds UrlState from list of route matches instead of uri

Implementation

factory UrlState.fromSegments(
  List<RouteMatch> routes, {
  bool shouldReplace = false,
  Object? state,
}) {
  return UrlState(
    _buildUri(routes),
    routes,
    shouldReplace: shouldReplace,
    pathState: state,
  );
}