Allow any Route to be offstage for an undetermined period of time #31972
Labels
c: proposal
A detailed proposal for a change to Flutter
f: routes
Navigator, Router, and related APIs.
framework
flutter/packages/flutter repository. See also f: labels.
P3
Issues that are less important to the Flutter project
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
Note: I plan on implementing this feature myself, but it will likely require a breaking change, and the change is not trivial.
Use case
A package I'm working on needs to act as a man in the middle between a
Navigator.push
and the appearance of the route on the screen.The idea is, a
NavigatorObserver
may force pushed routes to be in an offstage state similarly to howHero
works. But that offstage status may last for a lot longer than one frame. In the meantime, the previous route should stay visible and interactive.Currently, doing so leads to a black screen.
Proposal
offstage
property fromModalRoute
toRoute
.offstage
routes do not make the previous route invisible even if they areopaque
.offstage
routes don't capture clicks.Route
state.Misc:
opaque
variable.HeroController
and intoRoute
itself.The text was updated successfully, but these errors were encountered: