-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[webview_flutter_wkwebview] Implementation of WebViewWidget with WebKit #6342
[webview_flutter_wkwebview] Implementation of WebViewWidget with WebKit #6342
Conversation
@@ -36,7 +36,7 @@ class WebKitProxy { | |||
String keyPath, | |||
NSObject object, | |||
Map<NSKeyValueChangeKey, Object?> 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.
This was suppose to be nullable.
@visibleForTesting WebKitProxy webKitProxy = const WebKitProxy(), | ||
}) : super.implementation(params is WebKitWebViewControllerCreationParams | ||
WebKitWebViewController(PlatformWebViewControllerCreationParams params) | ||
: super.implementation(params is WebKitWebViewControllerCreationParams |
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 removes the webKitProxy
parameter from the object and just uses the one provided to the creation param.
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.
LGTM with one question.
} | ||
|
||
/// The WebKit WebView being controlled. | ||
late final WKWebView webView = withWeakRefenceTo(this, ( |
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.
Why do we need to make this public?
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.
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?
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.
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, |
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.
Optional nit: this might wrap more legibly without the comma.
Part of flutter/flutter#94051
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.