Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[webview_flutter] Extract WKWebView implementation into a separate pa…
…ckage (flutter#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 <[email protected]> * 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 <[email protected]>
- Loading branch information