Skip to content

[go_router] Support preloading of all StatefulShellBranch branches #127804

@alaatm

Description

@alaatm

Is there an existing issue for this?

Use case

As a next step to Nested stateful navigation with ShellRoute, it would be great to support an option to allow pre-loading of all the main branches.

This is to support data-oriented apps where each bottom navigation tab needs to fetch some data. While currently this can be done by doing the pre-fetching from within the initial bottom navigation tab, I think its best to have each tab resposible for its own logic and currently this is impossible as all tabs except the initial aren't loaded unless the user explicitly clicks the tab.

Proposal

Introduce an option to StatefulShellRoute whether or not to load all main branches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: go_routerThe go_router packagepackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions