Skip to content
Boring Doc
DeprecatedMedium impactOfficial migration guidesince 3.13.0landed 3.10.0-13.0.pre

Deprecated RouteInformation.location

Framework · Official source

`RouteInformation.location` and related APIs were deprecated in the favor of `RouteInformation.uri`.

Original behavior

The `RouteInformation` needs the authority information to handle mobile deeplinks from different web domains. The `uri` field was added to `RouteInformation` that captures the entire deeplink information and route-related parameters were converted to the full `Uri` format. This led to deprecation of incompatible APIs.

New behavior

* The `RouteInformation.location` was replaced by `RouteInformation.uri`. * The `WidgetBindingObserver.didPushRoute` was deprecated. * The `location` parameter of `SystemNavigator.routeInformationUpdated` was replaced by the newly added `uri` parameter.

Who is affected
Code that still calls the deprecated API; it keeps working until removal but produces analyzer warnings. Code that uses RouteInformation.location, RouteInformation.uri, RouteInformation and related APIs.
Practical impact
Warnings now; removal in a future release. Plan the migration but no immediate break.
What action should I take?
Follow the official migration guide below, update affected call sites, run `dart fix --apply` where a fix is available, then run your tests.

Before and after (from the official guide)

dart+1−1
Before
1−const RouteInformation myRoute = RouteInformation(location: '/myroute');
After
1+final RouteInformation myRoute = RouteInformation(uri: Uri.parse('/myroute'));
Raw before / after
const RouteInformation myRoute = RouteInformation(location: '/myroute');
final RouteInformation myRoute = RouteInformation(uri: Uri.parse('/myroute'));
Official migration guide (excerpt, © The Flutter Authors, CC BY 3.0)

Code before migration:

const RouteInformation myRoute = RouteInformation(location: '/myroute');

Code after migration:

final RouteInformation myRoute = RouteInformation(uri: Uri.parse('/myroute'));

Code before migration:

final String myPath = myRoute.location;

Code after migration:

final String myPath = myRoute.uri.path;

Code before migration:

class MyObserverState extends State<MyWidget> with WidgetsBindingObserver {
  @override
  Future<bool> didPushRoute(String route) => _handleRoute(route);
}

Code after migration:

class MyObserverState extends State<MyWidget> with WidgetsBindingObserver {
  @override
  Future<bool> didPushRouteInformation(RouteInformation routeInformation) => _handleRoute(
    Uri.decodeComponent(
      Uri(
        path: uri.path.isEmpty ? '/' : uri.path,
        queryParameters: uri.queryParametersAll.isEmpty ? null : uri.queryParametersAll,
        fragment: uri.fragment.isEmpty ? null : uri.fragment,
      ).toString(),
    )
  );
}

Code before migration:

SystemNavigator.routeInformationUpdated(location: '/myLocation');

Code after migration:

SystemNavigator.routeInformationUpdated(uri: Uri.parse('/myLocation'));
Migration assistantAI-generated · grounded in cited sources
AI explanations are not configured
Set AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.
Official migration guide·Verified classification (90%)

Listed in the official breaking-changes index; title states deprecation.

An official announcement or migration guide documents an intended behaviour or API change. A verified source change (git diff) shows code changed but does not by itself prove a public API is breaking. AI interpretations are labelled and never used to classify a change.

Source commit
b3045439b7c0
Source last updated
Oct 21, 2026
Last synchronized
Oct 21, 2026
Publication status
published
Publication history
  • Oct 21, 2026, 8:31 PM: new → published (ingestion) — Backed by an official breaking-change/migration guide.
AI explanationAI-generated · grounded in cited sources
AI explanations are not configured
Set AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.
Was this useful?
Deprecated RouteInformation.location · Boring Doc