This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Platform channel for predictive back #39208
Merged
Merged
Changes from 1 commit
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
Clean up
- Loading branch information
commit 01a22a235c219c2816ee077cf5ef7cfe78be5ceb
There are no files selected for viewing
This file contains hidden or 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 hidden or 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.
How do people feel about this name?
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.
suggestion: setFrameworkHandlesBack (without the plural s)?
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.
Maybe something to indicate it registers/unregisters a callback based on
frameworkHandlesBackssince it isn't actually setting that, e.g.toggleOnBackRegistry?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.
I'm going to go with
setFrameworkHandlesBackfor now.I kind of wanted to be generic about what is actually happening under the hood in case that changes, or in case we ever needed to do this on another platform that handles it differently. I think
setFrameworkHandlesBackworks well enough since it at least sounds declarative, like it's setting some state that decides what should happen to back gestures.Let me know if anyone has other thoughts though.