-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[webview_flutter_android] Adds internal wrapper methods for native WebViewClient
.
#8964
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_android] Adds internal wrapper methods for native WebViewClient
.
#8964
Conversation
@@ -52,6 +52,7 @@ android { | |||
implementation 'androidx.annotation:annotation:1.9.1' | |||
implementation 'androidx.webkit:webkit:1.12.1' | |||
testImplementation 'junit:junit:4.13.2' | |||
testImplementation 'org.mockito:mockito-core:5.16.1' |
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 required for me to run tests locally. I'm not sure if this is just me or not.
@@ -25,7 +25,7 @@ if (flutterVersionName == null) { | |||
android { | |||
namespace 'io.flutter.plugins.webviewflutterexample' | |||
compileSdk = flutter.compileSdkVersion | |||
|
|||
ndkVersion = flutter.ndkVersion |
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 also required for met to run tests locally.
WebViewClient
.
Wrong issue link? That one is about |
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 a few minor comments
...utter_android/android/src/main/java/io/flutter/plugins/webviewflutter/ProxyApiRegistrar.java
Outdated
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_android/pigeons/android_webkit.dart
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_android/pigeons/android_webkit.dart
Outdated
Show resolved
Hide resolved
@@ -513,7 +582,7 @@ abstract class WebChromeClient { | |||
late List<String> Function( | |||
WebView webView, | |||
FileChooserParams params, | |||
)? onShowFileChooser; | |||
) onShowFileChooser; |
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 the change to non-nullable on these callbacks?
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 caused by #8567. They are already implemented in the AndroidWebViewController
: https://github.com/flutter/packages/blob/main/packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart#L187. The method just wasn't required on the Dart side.
This adds the SSL classes for #7893 and a few extra
WebViewClient
methods.Pre-Review Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3