Skip to content

Navigator should support starting with an initial history #4702

Closed

Description

@Hixie

Instead of just pushing the initialRoute, we should split it on / and push every step of the route. So if the initialRoute is "/foo/bar/baz", we should first push "/", then "/foo", then "/foo/bar", then "/foo/bar/baz".

cc @devoncarew

Activity

  1. modified the milestone: on Aug 1, 2016
  2. modified the milestones: 2: Make Early Adopters happy, on Jan 31, 2017
  3. added
    c: API breakBackwards-incompatible API changes
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Jan 31, 2017
  4. abarth commented on Mar 14, 2017

    @abarth
    Contributor

    Hum... I'm not sure we want to force that sort of structure on route names. You should be able to load an initial history with more than one route pushed, but we should probably do that by taking a list of route names rather than but splitting a single route name on /.

  5. changed the title [-]initialRoute should support hierarchy[/-] [+]Navigator should support starting with an initial history[/+] on Mar 14, 2017
  6. abarth commented on Mar 14, 2017

    @abarth
    Contributor

    I think we'll be able to add this feature in a way that doesn't break the API.

  7. modified the milestones: , 2: Make Early Adopters happy on Mar 14, 2017
  8. kelegorm commented on Sep 3, 2017

    @kelegorm

    I don't think setting bunch of routes instead one /foo/bar/baz is a good idea. For example, consider Google Inbox application. I has "Add Reminder" widget which run application in route of adding reminder, and back action leads to close application. And it is a good behaviour.

  9. Hixie commented on Sep 3, 2017

    @Hixie
    ContributorAuthor

    We support this today actually, both ways. If your routes use /, we push the whole stack, if they use : or some other separator, we only push the one route.

  10. kelegorm commented on Sep 4, 2017

    @kelegorm

    Can we add it (":route" usage) to docs?

  11. Hixie commented on Sep 5, 2017

    @Hixie
    ContributorAuthor

    Yeah, see #11607 for the bug tracking the documentation efforts around routes.

  12. github-actions commented on Aug 17, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  13. locked as resolved and limited conversation to collaborators on Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions