Skip to content

[go_router_builder] Define routes in separate files #122258

@mikuhl-dev

Description

@mikuhl-dev

Use case

It looks like with go_router_builder, you are supposed to define all your routes into this one gigantic file, this also leads to making two different classes that essentially represent the same thing, like a HomeRoute, and HomePage that you pass in the HomeRoutes build method. At this point the code generation only solves the compile time checking, and instead leaves you with even MORE boilerplate.

Proposal

We should be able to define route data in separate files.

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 Fluttercustomer: crowdAffects or could affect many people, though not necessarily a specific customer.p: go_router_builderThe go_router_builder packagepackageflutter/packages repository. See also p: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions