-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Platform channel for predictive back #39208
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
9b25e71
Log everywhere I see onBackPressed... And it doesn't log anything!
justinmc b10efe3
Just hackily remove all usage of onBack, and predictive back does wor…
justinmc 75d8e38
Undid all of the commenting and deleting and located the one call tha…
justinmc e8a5130
No logging verbose
justinmc 9c0e7cc
WIP A platform channel API to declare that the nav stack is empty
justinmc 205d1e5
navigationStackIsEmpty method to enable predictive back
justinmc 66d1f84
Migrate to updateNavigationStackStatus, works for inner routes
justinmc 9e8e230
Clean up logs and todos
justinmc 0ed2bec
Rename hasMultiple to frameworkHandlesPop for clarity
justinmc 2afbbad
Merge branch 'main' into predictive-back-root
justinmc 8aeba57
Analyzer fix
justinmc 5e89211
WIP some debugging
justinmc 015f2a5
Merge branch 'main' into predictive-back-root
justinmc b7b2f17
Merge branch 'main' into predictive-back-root
justinmc 6bc7d5e
Rename to frameworkHandlesBacks
justinmc 01a22a2
Clean up
justinmc 6f22009
Confirmed that it works on my old (API 24) samsung device
justinmc 440a6ee
I dont think I need to modify flutterfragment(activity)
justinmc e075275
Tests and empty implementation for FlutterFragment
justinmc af98e2c
Merge remote-tracking branch 'upstream/main' into predictive-back-root
justinmc 1db22e5
More specific name for hasRegisteredCallback
justinmc 4701d66
Backs to Back
justinmc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that this is removed, it means that by default, Flutter will not handle back gestures. So if you start up a Flutter app that does nothing, has no Navigator or WidgetsApp etc., root predictive back will work. The framework will have to first call setFrameworkHandlesBacks in order to prevent predictive back and to handle back gestures itself. This will be handled automatically in Flutter apps that use WidgetsApp.