diff --git a/example/pubspec.lock b/example/pubspec.lock index 6bc56e45..56621d0d 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -106,58 +106,10 @@ packages: dependency: transitive description: name: flutter_inappwebview - sha256: "3e9a443a18ecef966fb930c3a76ca5ab6a7aafc0c7b5e14a4a850cf107b09959" + sha256: d198297060d116b94048301ee6749cd2e7d03c1f2689783f52d210a6b7aba350 url: "https://pub.dev" source: hosted - version: "6.0.0" - flutter_inappwebview_android: - dependency: transitive - description: - name: flutter_inappwebview_android - sha256: d247f6ed417f1f8c364612fa05a2ecba7f775c8d0c044c1d3b9ee33a6515c421 - url: "https://pub.dev" - source: hosted - version: "1.0.13" - flutter_inappwebview_internal_annotations: - dependency: transitive - description: - name: flutter_inappwebview_internal_annotations - sha256: "5f80fd30e208ddded7dbbcd0d569e7995f9f63d45ea3f548d8dd4c0b473fb4c8" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - flutter_inappwebview_ios: - dependency: transitive - description: - name: flutter_inappwebview_ios - sha256: f363577208b97b10b319cd0c428555cd8493e88b468019a8c5635a0e4312bd0f - url: "https://pub.dev" - source: hosted - version: "1.0.13" - flutter_inappwebview_macos: - dependency: transitive - description: - name: flutter_inappwebview_macos - sha256: b55b9e506c549ce88e26580351d2c71d54f4825901666bd6cfa4be9415bb2636 - url: "https://pub.dev" - source: hosted - version: "1.0.11" - flutter_inappwebview_platform_interface: - dependency: transitive - description: - name: flutter_inappwebview_platform_interface - sha256: "545fd4c25a07d2775f7d5af05a979b2cac4fbf79393b0a7f5d33ba39ba4f6187" - url: "https://pub.dev" - source: hosted - version: "1.0.10" - flutter_inappwebview_web: - dependency: transitive - description: - name: flutter_inappwebview_web - sha256: d8c680abfb6fec71609a700199635d38a744df0febd5544c5a020bd73de8ee07 - url: "https://pub.dev" - source: hosted - version: "1.0.8" + version: "5.8.0" flutter_keyboard_visibility: dependency: transitive description: @@ -239,14 +191,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" leak_tracker: dependency: transitive description: diff --git a/lib/src/widgets/html_editor_widget_mobile.dart b/lib/src/widgets/html_editor_widget_mobile.dart index 36d886c8..d3fe91c7 100644 --- a/lib/src/widgets/html_editor_widget_mobile.dart +++ b/lib/src/widgets/html_editor_widget_mobile.dart @@ -143,14 +143,17 @@ class _HtmlEditorWidgetMobileState extends State { } }); }, - initialSettings: InAppWebViewSettings( - javaScriptEnabled: true, - transparentBackground: true, - useShouldOverrideUrlLoading: true, - useHybridComposition: widget.htmlEditorOptions - .androidUseHybridComposition, - loadWithOverviewMode: true, - ), + initialOptions: InAppWebViewGroupOptions( + crossPlatform: InAppWebViewOptions( + javaScriptEnabled: true, + transparentBackground: true, + useShouldOverrideUrlLoading: true, + ), + android: AndroidInAppWebViewOptions( + useHybridComposition: widget + .htmlEditorOptions.androidUseHybridComposition, + loadWithOverviewMode: true, + )), initialUserScripts: widget.htmlEditorOptions.mobileInitialScripts as UnmodifiableListView?, @@ -213,7 +216,9 @@ class _HtmlEditorWidgetMobileState extends State { }); await setHeightJS(); } - var visibleDecimal = await visibleStream.stream.firstWhere((_) => !visibleStream.isClosed, orElse: () => 0); + var visibleDecimal = await visibleStream.stream + .firstWhere((_) => !visibleStream.isClosed, + orElse: () => 0); var newHeight = widget.otherOptions.height; if (visibleDecimal > 0.1) { this.setState(() { diff --git a/pubspec.lock b/pubspec.lock index 3a606b92..cd3cd2a9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -98,58 +98,10 @@ packages: dependency: "direct main" description: name: flutter_inappwebview - sha256: "3e9a443a18ecef966fb930c3a76ca5ab6a7aafc0c7b5e14a4a850cf107b09959" + sha256: d198297060d116b94048301ee6749cd2e7d03c1f2689783f52d210a6b7aba350 url: "https://pub.dev" source: hosted - version: "6.0.0" - flutter_inappwebview_android: - dependency: transitive - description: - name: flutter_inappwebview_android - sha256: d247f6ed417f1f8c364612fa05a2ecba7f775c8d0c044c1d3b9ee33a6515c421 - url: "https://pub.dev" - source: hosted - version: "1.0.13" - flutter_inappwebview_internal_annotations: - dependency: transitive - description: - name: flutter_inappwebview_internal_annotations - sha256: "5f80fd30e208ddded7dbbcd0d569e7995f9f63d45ea3f548d8dd4c0b473fb4c8" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - flutter_inappwebview_ios: - dependency: transitive - description: - name: flutter_inappwebview_ios - sha256: f363577208b97b10b319cd0c428555cd8493e88b468019a8c5635a0e4312bd0f - url: "https://pub.dev" - source: hosted - version: "1.0.13" - flutter_inappwebview_macos: - dependency: transitive - description: - name: flutter_inappwebview_macos - sha256: b55b9e506c549ce88e26580351d2c71d54f4825901666bd6cfa4be9415bb2636 - url: "https://pub.dev" - source: hosted - version: "1.0.11" - flutter_inappwebview_platform_interface: - dependency: transitive - description: - name: flutter_inappwebview_platform_interface - sha256: "545fd4c25a07d2775f7d5af05a979b2cac4fbf79393b0a7f5d33ba39ba4f6187" - url: "https://pub.dev" - source: hosted - version: "1.0.10" - flutter_inappwebview_web: - dependency: transitive - description: - name: flutter_inappwebview_web - sha256: d8c680abfb6fec71609a700199635d38a744df0febd5544c5a020bd73de8ee07 - url: "https://pub.dev" - source: hosted - version: "1.0.8" + version: "5.8.0" flutter_keyboard_visibility: dependency: "direct main" description: @@ -224,14 +176,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" leak_tracker: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 362b17e3..57570dec 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter # webview plugin - flutter_inappwebview: ^6.0.0 + flutter_inappwebview: ^5.8.0 # plugin to get webview's visible fraction for keyboard height adjustment visibility_detector: ^0.4.0+2 # plugin to get when the keyboard is hidden via back (Android)