-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[webview_flutter] Adds support to listen to url changes #3313
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
dbc0e36
platform interface
bparrishMines 14860c3
android
bparrishMines 9bf1f7f
ios
bparrishMines 9579d25
app facing
bparrishMines 88766ab
Merge branch 'main' of github.com:flutter/packages into url_change_tres
bparrishMines e0dbc46
Merge branch 'main' of github.com:flutter/packages into url_change_tres
bparrishMines be6f453
fix unused parameter
bparrishMines 9904b49
add history test and some fixes
bparrishMines d3ba003
undo slight mock changes
bparrishMines c4a9a73
Merge branch 'main' of github.com:flutter/packages into url_change_tres
bparrishMines b493548
remove dep overrides
bparrishMines 08d1c2c
create webview on android
bparrishMines 3946118
add android and wkwebview deps back
bparrishMines 3723132
Merge branch 'main' of github.com:flutter/packages into url_change_tres
bparrishMines b33679b
undo changes
bparrishMines 571bce4
docs fix
bparrishMines ca49681
version bumps
bparrishMines 4517615
remove overrides
bparrishMines 516cec3
change template name
bparrishMines 9079fa4
Merge branch 'main' of github.com:flutter/packages into url_change_tres
bparrishMines 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
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.
This was not added as a field of the clas because there is a chance that the field can be different from the actual value. For example, a user may set this value and then call
NavigationDelegate.platform.setOnUrlChange
:This is true for all the other callbacks, but changing them would be a breaking change.
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.
Couldn't we replace the final fields with getters, and have the getters return the
platform
version of the field, to preserve API compatibility while removing the potential for them to become out of sync?(Doesn't need to be in this PR.)
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.
@mvanbeusekom suggested something similar by making the callback method setters in
PlatformNavigationDelegate
fields instead of methods. I decided against it initially because using a method allowed us to throw anUnimplementedError
for unsupported callback methods. But we could add getters to the interface as a mix of both solutions.This wouldn't be possible in this PR since it is something we would have to add to the platform interface first anyways.