Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[webview_flutter] Add support for onPageStarted event #2295

Merged
merged 7 commits into from
Dec 6, 2019
Merged

[webview_flutter] Add support for onPageStarted event #2295

merged 7 commits into from
Dec 6, 2019

Conversation

jeremie-movify
Copy link
Contributor

Description

Added support for onPageStarted event on both Android and iOS.
Bound to WebViewClient's public void onPageStarted(WebView view, String url, Bitmap favicon)
and WKWebView's - (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation.

Related Issues

None

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@ened
Copy link
Contributor

ened commented Dec 3, 2019

Hi @jeremie-movify thank you for the PR!
I noticed webview_flutter also has integration tests in example/test_driver. They cover onPageFinished / onPageLoaded already. Could you extend this PR so that onPageStarted is included as well?
Thank you!

@jeremie-movify
Copy link
Contributor Author

Hi @ened,
Of course ; I'll get it done before the end of the week. Thank you for your suggestion.

@ened
Copy link
Contributor

ened commented Dec 4, 2019

Hi @jeremie-movify looks like we're getting close. Please resolve the formatting issues and we can merge once everything else is green :)

Copy link
Contributor

@ened ened left a comment

Choose a reason for hiding this comment

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

LGTM - thank you

@lhc-up
Copy link

lhc-up commented Dec 5, 2019

Hi@ened how can I get the latest version with 'onPageStarted'?

@lhc-up
Copy link

lhc-up commented Dec 5, 2019

I have tried changing the version to 0.3.18,but got nothing.

@jeremie-movify
Copy link
Contributor Author

Hi @luohao8023,

This PR is not yet merged ; you'll be able to access the latest API (with support for onPageStarted) as soon as it is.

In the meantime, you may want to point your dependency to my fork of this repository, and use the latest commit hash as reference.

Cheers,

Jérémie

@ened ened merged commit be71485 into flutter:master Dec 6, 2019
daohoangson added a commit to daohoangson/plugins that referenced this pull request Dec 7, 2019
…flutter/has_gesture

* commit 'be71485431cd5ebaeb7cad4c57ddeb0be910d8b6': (74 commits)
  [webview_flutter] Add support for onPageStarted event (flutter#2295)
  adds missing [[ to elif statement in scripts/incremental_build.sh (flutter#2358)
  [none] Pass --custom-analysis flag through CI (flutter#2356)
  [video_player] Document public API of video_player_platform_interface. (flutter#2355)
  [none] Lock pedantic version (flutter#2354)
  [video_player_platform_interface] Fix some pedantic lints (flutter#2349)
  Export SignInOption from interface since it is used in the frontend (flutter#2350)
  Update documentation for connectivity (flutter#2328)
  [ android_alarm_manager ] Loosen Flutter SDK lower bound, update README (flutter#2338)
  [e2e_macos] Remove redundant analysis_options.yaml (flutter#2347)
  Revert "[android_alarm_manager] Update minimum Flutter version to 1.12.0 (flutter#2327)" (flutter#2345)
  [video_player] Add web implementation using platform interface (flutter#2279)
  [webview_flutter] Fix pedantic lint errors (flutter#2322)
  [google_maps_flutter] Add documentation (flutter#2303)
  [e2e] Fix pedantic lints (flutter#2315)
  [video_player] Fix pedantic lints (flutter#2321)
  [share] Fix pedantic lints (flutter#2320)
  [battery] Fix pedantic linter errors (flutter#2311)
  [device_info] Fix pedantic errors (flutter#2314)
  [in_app_purchase] Fix most failing pedantic lints (flutter#2317)
  ...

# Conflicts:
#	packages/webview_flutter/CHANGELOG.md
#	packages/webview_flutter/lib/platform_interface.dart
#	packages/webview_flutter/lib/webview_flutter.dart
#	packages/webview_flutter/pubspec.yaml
@amirh
Copy link
Contributor

amirh commented Dec 9, 2019

nit: this PR should have updated the version in pubspec.yaml as well

@jeremie-movify
Copy link
Contributor Author

nit: this PR should have updated the version in pubspec.yaml as well

You're right, my bad ; this was done in a different branch, and got lost at some point.

@ened
Copy link
Contributor

ened commented Dec 10, 2019

Argh, I didn't spot that. Sorry, will check more careful as well, next time. Thx @amirh

sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
* Added support for webView's 'onPageStarted' event
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
* Added support for webView's 'onPageStarted' event
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants