[webview_flutter] Extract WKWebView implementation into a separate package (#4345)

* Setup webview_flutter_wkwebview package.

Creates a new `webview_flutter_wkwebview` directory and adds
the following meta-data files:
- `AUTHORS`: copied from the `webview_flutter` package and added my name;
- `CHANGELOG.md`: new file adding description for release 0.0.1;
- `LICENSE`: copied from the `webview_flutter` package;
- `README.md`: new file adding the standard platform implementation
  description;
- `pubspec.yaml`: new file adding package meta-data for the
  `webview_flutter_wkwebview` package.

* Direct copy of "iOS" folder.

A one to one copy of the `webview_flutter/ios` folder to
`webview_flutter_wkwebview/` using the following command:
```
cp -R ./webview_flutter/ios ./webview_flutter_wkwebview/
```

* Rename .podspec file to match package name.

For the Cocaopod package to be registered correctly the .podspec file
name needs to match the name of the Flutter package.

* Direct copy of WKWebView specific .dart files.

Copied the WKWebView specific .dart files over from the
`./webview_flutter` package.

* Modify .dart code to work with new platform_interface.

Make sure the `CupertinoWebView` widget extends the `WebViewPlatform`
class from the `webview_flutter_platform_interface` package correctly by
accepting an instance of the `JavascriptChannelRegistry` class.

* Direct copy of the `webview_flutter/example` app.

This commit makes a direct copy of the `webview_flutter/example` app to
the  `webview_flutter_wkwebview` package. After the copy the `example/android`
folder is removed as it doesn't serve a purpose in the WKWebView specific
package. Commands run where:
```
cp -R ./webview_flutter/example ./webview_flutter_wkwebview/
rm -rf ./webview_flutter_wkwebview/example/ios
```

* Update example to WKWebView specific implementation.

This commit updates the example App so it directly implements the
WKWebView specific implementation of the webview_flutter_platform_interface.

* Update integration tests.

Updated the existing integration tests (copied from webview_flutter
package) so they work correctly with the implementation of the
webview_flutter_wkwebview package.

Co-authored-by: BeMacized <bodhimulders@bemacized.net>

* Fix iOS UI tests.

This commit resolves failing UI tests and ensures the `Publishable` task
is green.

* Point to existing documentation URL

Update the documentation URL in the
`ios/webview_flutter_wkwebview.podspec` file to point to a valid
location. The `https://pub.dev/packages/webview_flutter_wkwebview`
package doesn't exists until this PR is published. However the `pod lib
lint` step in CI is failing if the URL doesn't exist yet.

* Split helper classes from main example widget.

Move the `WebView` and related `WebViewController` classes from the
main.dart into a separate web_view.dart file.

* Updated version numbers as suggested in review.

Updated the version of the plugin to the version of webview_flutter
package (2.0.13).

Also updated the Dart and Flutter versions to respectively 2.14.0 and
2.5.0.

Co-authored-by: BeMacized <bodhimulders@bemacized.net>
73 files changed
tree: 70800816544def1b917dbb2e727047b302db9ebf
  1. .ci/
  2. .github/
  3. .opensource/
  4. packages/
  5. script/
  6. .ci.yaml
  7. .cirrus.yml
  8. .clang-format
  9. .gitattributes
  10. .gitignore
  11. analysis_options.yaml
  12. analysis_options_legacy.yaml
  13. AUTHORS
  14. CODEOWNERS
  15. CONTRIBUTING.md
  16. FlutterFire.md
  17. LICENSE
  18. README.md
README.md

Flutter plugins

Build Status Release Status

This repo is a companion repo to the main flutter repo. It contains the source code for Flutter first-party plugins (i.e., plugins developed by the core Flutter team). Check the packages directory for all plugins.

Flutter plugins enable access to platform-specific APIs. For more information about plugins, and how to use them, see https://flutter.dev/platform-plugins/.

These plugins are also available on pub.

Issues

Please file any issues, bugs, or feature requests in the main flutter repo.

Issues pertaining to this repository are labeled “plugin”.

Contributing

If you wish to contribute a new plugin to the Flutter ecosystem, please see the documentation for developing packages and platform channels. You can store your plugin source code in any GitHub repository (the present repo is only intended for plugins developed by the core Flutter team). Once your plugin is ready you can publish to the pub repository.

If you wish to contribute a change to any of the existing plugins in this repo, please review our contribution guide, and send a pull request.

Plugins

These are the available plugins in this repository.

PluginPubPointsPopularityLikes
camerapub packagepub pointspopularitylikes
espressopub packagepub pointspopularitylikes
flutter_plugin_android_lifecyclepub packagepub pointspopularitylikes
google_maps_flutterpub packagepub pointspopularitylikes
google_sign_inpub packagepub pointspopularitylikes
image_pickerpub packagepub pointspopularitylikes
in_app_purchasepub packagepub pointspopularitylikes
ios_platform_imagespub packagepub pointspopularitylikes
local_authpub packagepub pointspopularitylikes
path_providerpub packagepub pointspopularitylikes
plugin_platform_interfacepub packagepub pointspopularitylikes
quick_actionspub packagepub pointspopularitylikes
shared_preferencespub packagepub pointspopularitylikes
url_launcherpub packagepub pointspopularitylikes
video_playerpub packagepub pointspopularitylikes
webview_flutterpub packagepub pointspopularitylikes

Deprecated

The following plugins are also part of this repository, but are deprecated in favor of the Flutter Community Plus versions.

PluginPubReplacementPub
android_alarm_managerpub packageandroid_alarm_manager_pluspub package
android_intentpub packageandroid_intent_pluspub package
batterypub packagebattery_pluspub package
connectivitypub packageconnectivity_pluspub package
device_infopub packagedevice_info_pluspub package
package_infopub packagepackage_info_pluspub package
sensorspub packagesensors_pluspub package
sharepub packageshare_pluspub package
wifi_info_flutterpub packagenetwork_info_pluspub package