Skip to content

Commit

Permalink
[webview_flutter] Update sample code. (#4727)
Browse files Browse the repository at this point in the history
Documentation was updated in app-example file but not in `webview_controller.dart`.   
'output' is a positional parameter now, and `JavascriptMessage` changed to `JavaScriptMessage`

Fixes issue flutter/flutter#132727
  • Loading branch information
opxdelwin authored Aug 22, 2023
1 parent c6f758b commit d72a5fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/webview_flutter/webview_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 4.2.3

* Fixes the code sample in the dartdocs for `WebViewController.addJavaScriptChannel`.
* Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.

## 4.2.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ class WebViewController {
/// ```dart
/// final WebViewController controller = WebViewController();
/// controller.addJavaScriptChannel(
/// name: 'Print',
/// onMessageReceived: (JavascriptMessage message) {
/// 'Print',
/// onMessageReceived: (JavaScriptMessage message) {
/// print(message.message);
/// },
/// );
Expand Down
2 changes: 1 addition & 1 deletion packages/webview_flutter/webview_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: webview_flutter
description: A Flutter plugin that provides a WebView widget on Android and iOS.
repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22
version: 4.2.2
version: 4.2.3

environment:
sdk: ">=2.19.0 <4.0.0"
Expand Down

0 comments on commit d72a5fe

Please sign in to comment.