Skip to content

Navigator.push and Navigator.pushNamed should return Futures - #6333

Merged
abarth merged 1 commit into
flutter:masterfrom
abarth:push_future
Oct 14, 2016
Merged

abarth merged 1 commit into
flutter:masterfrom
abarth:push_future

Conversation

@abarth

@abarth abarth commented Oct 14, 2016

Copy link
Copy Markdown
Contributor

These futures complete when the route is popped off the navigator. This
generalizes and simplifies a mechanism already in place for dialogs and
menus.

Fixes #5283

@abarth

abarth commented Oct 14, 2016

Copy link
Copy Markdown
Contributor Author

@Hixie

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this function should take an optional named argument to pass to pop

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should mention these details (from the removed comment) maybe in the completed docs or something

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. (I think these docs were actually backwards, fwiw)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifically the relative timings of these futures resolving

@Hixie

Hixie commented Oct 14, 2016

Copy link
Copy Markdown
Contributor

LGTM

Thanks for doing this.

@abarth

abarth commented Oct 14, 2016

Copy link
Copy Markdown
Contributor Author

Had to tweak how overlay route works. See finishedWhenPopped for what needed to change.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

starts

@Hixie

Hixie commented Oct 14, 2016

Copy link
Copy Markdown
Contributor

that change makes sense.

LGTM.

These futures complete when the route is popped off the navigator. This
generalizes and simplifies a mechanism already in place for dialogs and
menus.

Fixes flutter#5283
@abarth
abarth merged commit ffe14b0 into flutter:master Oct 14, 2016
@abarth
abarth deleted the push_future branch October 14, 2016 23:05
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 15, 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.

Need startActivityForResult() equivalent on Flutter

2 participants