flutter_inappwebview icon indicating copy to clipboard operation
flutter_inappwebview copied to clipboard

Migrate to package:web for Wasm compatibility

Open johnpryan opened this issue 1 year ago • 1 comments

This migrates from dart:html to package:web for Wasm compatibility

johnpryan avatar Dec 11 '23 22:12 johnpryan

web package seems to be highly experimental currently. Also, using that package would increase the minimum Dart SDK to ^3.2.0. Probably, the best way to support it would be to create a new implementation package for web wasm instead of updating the current one.

pichillilorenzo avatar Dec 17 '23 23:12 pichillilorenzo

WASM is getting stable soon. Many packages are now compatible with Wasm. @pichillilorenzo any plans to make it compatible with WASM ? Thank you

The-RootCause avatar Mar 15 '24 01:03 The-RootCause

@johnpryan Your version is still not fully wasm compatible,

../../.pub-cache/hosted/pub.dev/flutter_inappwebview_web-1.0.8/lib/web/in_app_web_view_web_element.dart:7:1: Error: JS interop library 'dart:js' can't be imported when compiling to Wasm.
Try using 'dart:js_interop' or 'dart:js_interop_unsafe' instead.
import 'dart:js' as js;
^
../../.pub-cache/hosted/pub.dev/flutter_inappwebview_web-1.0.8/lib/web/platform_util.dart:5:1: Error: JS interop library 'dart:js' can't be imported when compiling to Wasm.
Try using 'dart:js_interop' or 'dart:js_interop_unsafe' instead.
import 'dart:js' as js;
^

Anyway you can migrate the js to js_interop ? Thank you

The-RootCause avatar Mar 15 '24 11:03 The-RootCause

@The-RootCause I created a PR with migration to js_interop: https://github.com/pichillilorenzo/flutter_inappwebview/pull/2067

p-mazhnik avatar Mar 16 '24 17:03 p-mazhnik