-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[webview_flutter] Copies app-facing implementation of webview_flutter from v4_webview #6856
[webview_flutter] Copies app-facing implementation of webview_flutter from v4_webview #6856
Conversation
* Updates code for `no_leading_underscores_for_local_identifiers` lint. | ||
* Updates minimum Flutter version to 2.10. | ||
* Updates minimum Flutter version to 3.0.0. | ||
* Fixes avoid_redundant_argument_values lint warnings and minor typos. | ||
* Ignores unnecessary import warnings in preparation for [upcoming Flutter changes](https://github.com/flutter/flutter/pull/104231). |
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.
Let's collapse these two and the underscores one above to a catch-all "Updates code for new analysis options." so there's less minor stuff listed in with the big change.
@@ -1,41 +1,73 @@ | |||
# WebView for Flutter | |||
|
|||
<?code-excerpt path-base="excerpts/packages/webview_flutter_example"?> |
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.
Thanks! You can remove this package from script/configs/temp_exclude_excerpt.yaml in this PR as well.
@@ -45,54 +77,141 @@ android { | |||
} | |||
``` | |||
|
|||
### Using Virtual displays | |||
### Platform Specific Features |
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.
Nit: Platform-Specific Features
|
||
1. Set the correct `minSdkVersion` in `android/app/build.gradle` (if it was previously lower than 20): | ||
Many classes have a subclass or an underlying implementation that provides access to platform | ||
specific features. |
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.
Same here: platform-specific features
|
||
### Replacing WebView Functionality | ||
|
||
The `WebView` class has been removed and it's functionality has been split into `WebViewController` |
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.
Nit: its
and `WebViewWidget`. | ||
|
||
`WebViewController` handles all functionality that is associated with the underlying WebView | ||
provided by each platform. (e.g. loading a url, setting the background color of the underlying |
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.
Nit: "e.g.,"
The `WebView` class has been removed and it's functionality has been split into `WebViewController` | ||
and `WebViewWidget`. | ||
|
||
`WebViewController` handles all functionality that is associated with the underlying WebView |
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.
Nit: "underlying web view" since it's referring to the concept rather than a class.
* `WebView.initialMediaPlaybackPolicy` -> `WebKitWebViewControllerCreationParams.mediaTypesRequiringUserAction` | ||
* `WebView.allowsInlineMediaPlayback` -> `WebKitWebViewControllerCreationParams.allowsInlineMediaPlayback` | ||
|
||
## Enable Material Components for Android |
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.
Shouldn't this and the next section still be ###
headings under ## Usage
?
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 last README nit, plus removing the platform-layer-only types from the this package's export list, per your comment. Since the export issue only applies to using the platform interface, we can remove them here and land this, and make the implementation re-export fixes in parallel, right (rather than having to wait to land those package updates before landing this)?
* `WebView.gestureNavigationEnabled` -> `WebKitWebViewController.setAllowsBackForwardNavigationGestures` | ||
* `WebView.initialMediaPlaybackPolicy` -> `WebKitWebViewControllerCreationParams.mediaTypesRequiringUserAction` | ||
* `WebView.allowsInlineMediaPlayback` -> `WebKitWebViewControllerCreationParams.allowsInlineMediaPlayback` | ||
|
||
### Enable Material Components for Android |
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.
Sorry, my last comment wasn't very clear. These should be ###
as you've done, but they also need to be moved up to just before the new ## Migrating from 3.0 to 4.0
section so that they are nested under Usage
rather than the migration section.
@stuartmorgan Thanks for your help for getting this though so late! |
…ew_flutter from v4_webview (flutter/plugins#6856)
* 5f62d21eb [local_auth] Fix failed biometric authentication not throwing error (flutter/plugins#6821) * ca974ab0c [webview_flutter_web] Copies web implementation of webview_flutter from v4_webview (flutter/plugins#6854) * 4d11be416 [image_picker] Don't store null paths in lost cache (flutter/plugins#6678) * fd2841fd0 [webview_flutter_android] Fix timeouts in the integration tests (flutter/plugins#6857) * abc9f9a9b [flutter_plugin_tools] If `clang-format` does not run, fall back to other executables in PATH (flutter/plugins#6853) * 7efb5e89d [video_player] Add compatibility with the current platform interface (flutter/plugins#6855) * 32dcbf3e3 [image_picker] Improve image_picker for iOS to handle more image types (flutter/plugins#6812) * 840a04954 [webview_flutter] Copies app-facing implementation of webview_flutter from v4_webview (flutter/plugins#6856)
…#117314) * 5f62d21eb [local_auth] Fix failed biometric authentication not throwing error (flutter/plugins#6821) * ca974ab0c [webview_flutter_web] Copies web implementation of webview_flutter from v4_webview (flutter/plugins#6854) * 4d11be416 [image_picker] Don't store null paths in lost cache (flutter/plugins#6678) * fd2841fd0 [webview_flutter_android] Fix timeouts in the integration tests (flutter/plugins#6857) * abc9f9a9b [flutter_plugin_tools] If `clang-format` does not run, fall back to other executables in PATH (flutter/plugins#6853) * 7efb5e89d [video_player] Add compatibility with the current platform interface (flutter/plugins#6855) * 32dcbf3e3 [image_picker] Improve image_picker for iOS to handle more image types (flutter/plugins#6812) * 840a04954 [webview_flutter] Copies app-facing implementation of webview_flutter from v4_webview (flutter/plugins#6856)
… from v4_webview (flutter#6856) * copy code from v4_webview * version bump and readme update * work towards better readme * improvements * more readme progress * improvements * fix main and update more readme * excerpt changes and more 3.0 diffs * cookie manager update * remove packages from exclude list * lint * better range * isForMainFrame * load page after waiting for widget * fix integration tests * improve readme a bit * collapse changelong. update platform-specific wording. include in excerpt tests * use platform implementation packages * include missing exports * PR comments * correct spelling * interface dev dependency * move other usage above migration * remove interface classes
webview_flutter
fromv4_webview
branch.pubspec.yaml
,CHANGELOG.md
. andREADME
.example/lib/simple_example.dart
to add a simple example to readme with excerpt.example/lib/main.dart
to improve excerpts.Fixes 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.