-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
flutter/packages
#3368Labels
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 capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Use case
I've noticed that currently is not possible to pass data with context.pop to somehow update/refresh the previous page. I know something similar could be achieved using context.goNamed but using it will clear the whole stack, and recreate it from the path, which is not always something desirable.
Proposal
The solution could be to update the previous page with the new queryParams, data etc.
The API could look like this:
void popAndUpdate({
Map<String, String> params = const <String, String>{},
Map<String, String> queryParams = const <String, String>{},
Object? extra,
}) =>
// TODOSuch a method could pop the current page and updates the previous one with passed arguments, so it could be refreshed.
mrgnhnt96, Julien-Deudon, esarbanis, novas1r1, jttuboi and 7 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 capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version