Skip to content

Remove StateRoutes#573

Merged
Hixie merged 1 commit intoflutter:masterfrom
Hixie:yak3-navigator-no-StateRoute
Nov 24, 2015
Merged

Remove StateRoutes#573
Hixie merged 1 commit intoflutter:masterfrom
Hixie:yak3-navigator-no-StateRoute

Conversation

@Hixie
Copy link
Contributor

@Hixie Hixie commented Nov 24, 2015

Navigator.of(context).push(new StateRoute())
...is now:
ModalRoute.of(context).addLocalHistoryEntry(new LocalHistoryEntry())
StateRoute and LocalHistoryEntry are similar, except onPop is now onRemove and LocalHistoryEntry has a remove() method that causes the local history entry to be removed.

Route.didPop() and NavigatorState.pop() now return a boolean saying whether or not the route or navigator (respectively) handled the pop itself.

Other changes:

  • Heroes now trigger on PageRoutes, not ModalRoutes.
  • hasPreviousRoute is gone.
  • NavigatorState.remove() is gone.

A subsequent patch will simplify the isCurrent stuff which is now overengineered.

Fixes #553.

@abarth
Copy link
Contributor

abarth commented Nov 24, 2015

LGTM

Hixie added a commit that referenced this pull request Nov 24, 2015
@Hixie Hixie merged commit 12cbd65 into flutter:master Nov 24, 2015
@Hixie Hixie deleted the yak3-navigator-no-StateRoute branch November 24, 2015 20:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fold StateRoute concept into a feature of ModalRoute

2 participants