useRouteURI function

Uri useRouteURI(
  1. BuildContext context
)

Returns the current URI from the nearest route scope.

Throws a FlutterError when no RouteScopeProvider is found above the current BuildContext.

Implementation

Uri useRouteURI(BuildContext context) {
  final RouteScopeProvider(:location) = .of(context, RouteScope.uri);
  return location.uri;
}