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

[webview_flutter_wkwebview] Implementation of WebViewWidget with WebKit #6342

Merged
merged 10 commits into from
Sep 1, 2022

Conversation

bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented Aug 31, 2022

Part of flutter/flutter#94051

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added p: webview_flutter Edits files for a webview_flutter plugin platform-ios labels Aug 31, 2022
@bparrishMines bparrishMines changed the title Wkwebview webview widget [webview_flutter_wkwebview] Implementation of WebViewWidget with WebKit Aug 31, 2022
@@ -36,7 +36,7 @@ class WebKitProxy {
String keyPath,
NSObject object,
Map<NSKeyValueChangeKey, Object?> change,
)
)?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was suppose to be nullable.

@visibleForTesting WebKitProxy webKitProxy = const WebKitProxy(),
}) : super.implementation(params is WebKitWebViewControllerCreationParams
WebKitWebViewController(PlatformWebViewControllerCreationParams params)
: super.implementation(params is WebKitWebViewControllerCreationParams
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This removes the webKitProxy parameter from the object and just uses the one provided to the creation param.

@bparrishMines bparrishMines added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Aug 31, 2022
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM with one question.

}

/// The WebKit WebView being controlled.
late final WKWebView webView = withWeakRefenceTo(this, (
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to make this public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

WebViewWidget needs this parameter and it's in a separate file. I was actually debating on how to handle this. We aren't at the point where we want to expose the wrapped API, so I might move the WebKitWebViewController and WebKitWebViewWidget in to the same file?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds reasonable; based on my recent discussions with Hixie it sounds like that's the preferred solution for this kind of thing.

@@ -24,6 +25,13 @@ class WebKitWebViewPlatform extends WebViewPlatform {
return WebKitNavigationDelegate(params);
}

@override
WebKitWebViewWidget createPlatformWebViewWidget(
PlatformWebViewWidgetCreationParams params,
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional nit: this might wrap more legibly without the comma.

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 1, 2022
@auto-submit auto-submit bot merged commit 23cd9a1 into flutter:main Sep 1, 2022
@bparrishMines bparrishMines deleted the wkwebview_webview_widget branch September 1, 2022 17:06
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 8, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 8, 2022
adam-harwood pushed a commit to adam-harwood/flutter_plugins that referenced this pull request Nov 3, 2022
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: webview_flutter Edits files for a webview_flutter plugin platform-ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants