Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[webview_flutter] Expose loadFile and loadHtmlString through app facing package. #4558

Merged
merged 18 commits into from
Dec 6, 2021

Conversation

mvanbeusekom
Copy link
Contributor

[WIP]: This PR has a dependency on PR #4544. The webview_flutter/pubspec.yaml needs to be updated once that PR has landed.

Adds implementation to the WebViewController class to expose the WebViewPlatformController.loadFile and WebViewPlatformController.loadHtmlString methods.

Related to issues:

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter]. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the [CLA].
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].
  • I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style].
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

This commit adds the `loadData` and `loadDataWithBaseUrl` methods to the
pigeon communication interface. Next step would be to include the
implementation details on the Android (JAVA) side.
Adds the native Android implementation for the `loadData` and
`loadDataWithBaseUrl` API methods.
Adds the Dart implementation of Android's WebView `loadData` and
`loadDataWithBaseUrl` methods.

Also fixed support for null parameters in the native Android
implementation.
Adds implementation to the `WebViewController` class to expose the
`WebViewPlatformController.loadFile` and
`WebViewPlatformController.loadHtmlString` methods.
Adds unit tests for the `loadFile` and `loadHtmlString` methods which
are added to the `WebViewController` class in commit
f8e9c32.
Adds example implementation of the `WebViewController.loadHtmlString`
and `WebViewController.loadFile` methods to the example app.
Updates the version of the app facing plugin to 2.4.0 and adds a
matching entry to the CHANGELOG.md.
@google-cla google-cla bot added the cla: yes label Nov 30, 2021
@github-actions github-actions bot added p: webview_flutter Edits files for a webview_flutter plugin platform-android labels Nov 30, 2021
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits.

@mvanbeusekom mvanbeusekom added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Dec 6, 2021
@fluttergithubbot fluttergithubbot merged commit 7d9cc84 into flutter:master Dec 6, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 6, 2021
amantoux pushed a commit to amantoux/plugins that referenced this pull request Dec 11, 2021
KyleFin pushed a commit to KyleFin/plugins that referenced this pull request Dec 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes p: webview_flutter Edits files for a webview_flutter plugin waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
3 participants