-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[webview_flutter] Copies app-facing implementation of webview_flutter from v4_webview #6856
Changes from 1 commit
7f876d1
56fceb9
2a4b7d3
e90e7df
b2480f8
0d4e703
9968f38
301fafa
e56c091
65d28ed
c41fa5b
f5e7243
720082e
de00284
fc2d6cb
f1c7a65
b206a23
998d8ae
a496fef
feb0b2e
fcf987d
4ff354b
72f1db8
45d1a34
cc30a02
cc24cbb
52069b3
dbc20fa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -110,8 +110,18 @@ import 'package:webview_flutter/android.dart'; | |
| import 'package:webview_flutter/wkwebview.dart'; | ||
|
||
| ``` | ||
|
|
||
| Then additional features can be accessed through the platform implementations provided by the | ||
| imports above: | ||
| Now, additional features can be accessed through the platform implementations. Classes | ||
| `WebViewController`, `WebViewWidget`, `NavigationDelegate`, and `WebViewCookieManager` pass their | ||
| functionality to a class provided by the current platform. Below are a couple of ways to access | ||
| additional functionality provided by the platform and is followed by an example. | ||
|
|
||
| 1. Pass a creation params class provided by a platform implementation to a `fromPlatformCreationParams` | ||
| constructor (e.g. `WebViewController.fromPlatformCreationParams`, | ||
| `WebViewWidget.fromPlatformCreationParams`, etc...). | ||
|
||
| 2. Calling methods on a platform implementation of a class by using the `platform` field (e.g. | ||
| `WebViewController.platform`, `WebViewWidget.platform`, etc...). | ||
|
|
||
| Below is an example of setting additional iOS and Android parameters to the WebViewController. | ||
|
|
||
| <?code-excerpt "main.dart (platform_features)"?> | ||
| ```dart | ||
|
|
@@ -190,10 +200,15 @@ Below is a non-exhaustive list of changes to the API: | |
| * `WebView.zoomEnabled` -> `WebViewController.enableZoom` | ||
| * `WebView.userAgent` -> `WebViewController.setUserAgent` | ||
| * `WebView.backgroundColor` -> `WebViewController.setBackgroundColor` | ||
| * The following features have been moved to an Android implementation class. See | ||
| `aoijfea` section to use platform specific features. | ||
| * The following features have been moved to an Android implementation class. See | ||
| `aoijfea` section to use platform specific features. | ||
| * The following features have been moved to an Android implementation class. See section | ||
| `Platform Specific Features` for details on accessing Android platform specific features. | ||
| * `WebView.debuggingEnabled` -> `AndroidWebViewController.enableDebugging` | ||
| * `WebView.initialMediaPlaybackPolicy` -> `AndroidWebViewController.setMediaPlaybackRequiresUserGesture` | ||
| * The following features have been moved to an iOS implementation class. See section | ||
| `Platform Specific Features` for details on accessing iOS platform specific features. | ||
| * `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.
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.