-
Notifications
You must be signed in to change notification settings - Fork 29.5k
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
Description
Currently there is no API to get the current route information such as query parameter, path, or path parameter in a widget subtree underneath the page. Ideally go_router should provide a inherited widget or some sort to allow user to get GoRouteState or GoRouteMatch from the current context. for example
@override
Widget build(BuildContext context) {
final GoRouteState state = GoRouteState.of(context);
return Text('The location is ${state.location}');
}UCetinkaya94, JonasSondergard, laiiihz, tfitzke, ElteHupkes and 4 more
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.