Skip to content

go_router deep linking behaviour #138632

@KestasVenslauskas

Description

@KestasVenslauskas

Is there an existing issue for this?

Use case

My app does process payments outside the app - using browser.
Final url is our deepLink which gets triggered. I want it to open my current route with updated query parameters.
Currently if we open a deep-link the whole stack is poped and the screens are lost with its state. Then it created new route which was given in the deep-link URI and opens that route in initial state.

Proposal

Let go_router control this behaviour when opening deepLinks. Behaviour modes could be:

  • REPLACE - as current implementation
  • PUSH - the new one. This could simply call push method on go_router instead replace

Another approach is to add deepLink handler which would allow app to intercept a redirect completely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: 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.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