Skip to content

Prevent the entire navigation stack from being rebuilt from dependency changes #96044

@b3nni97

Description

@b3nni97

I have the problem that all widgets in a navigator stack are rebuilt when e.g. the MediaQuery changes (opening the keyboard).
If there are many routes in the navigator it can cause the app to start janking, even though every single build method of a single route would only take about 2-3 ms.

Wouldn't it be possible to teach the navigator to update routes with the "newest" dependencies only when a route becomes visible again?

It doesn't really make sense to rebuild the whole app on an opening keyboard when only one page is visible.

If I have overlooked something how to solve this problem I would be very grateful for suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterf: routesNavigator, Router, and related APIs.frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions