pichillilorenzo / flutter_inappwebview

A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
https://inappwebview.dev
Apache License 2.0
3.09k stars 1.39k forks source link

WASM compatibility #2052

Open The-RootCause opened 4 months ago

The-RootCause commented 4 months ago

Hello,

The current package is not Wasm compatible. The following files has issues when attempting wasm compilation:

`Detailed import paths for (some of) the these imports:

main.dart => web_plugin_registrant.dart => package:flutter_inappwebview_web/web/main.dart => package:flutter_inappwebview_web/web/web_platform.dart => package:flutter_inappwebview_web/web/headless_inappwebview_manager.dart => dart:html
main.dart => web_plugin_registrant.dart => package:flutter_inappwebview_web/web/main.dart => package:flutter_inappwebview_web/web/web_platform.dart => package:flutter_inappwebview_web/web/headless_inappwebview_manager.dart =>
package:flutter_inappwebview_web/web/in_app_web_view_web_element.dart => dart:html
main.dart => web_plugin_registrant.dart => package:flutter_inappwebview_web/web/main.dart => package:flutter_inappwebview_web/web/web_platform.dart => package:flutter_inappwebview_web/web/headless_inappwebview_manager.dart =>
package:flutter_inappwebview_web/web/headless_in_app_web_view_web_element.dart => package:flutter_inappwebview_web/web/in_app_web_view_web_element.dart => dart:html
main.dart => web_plugin_registrant.dart => package:flutter_inappwebview_web/web/main.dart => package:flutter_inappwebview_web/web/web_platform.dart => package:flutter_inappwebview_web/web/in_app_web_view_web_element.dart => dart:html
main.dart => web_plugin_registrant.dart => package:flutter_inappwebview_web/web/main.dart => package:flutter_inappwebview_web/web/web_platform.dart => package:flutter_inappwebview_web/web/shims/platform_view_registry.dart =>
package:flutter_inappwebview_web/web/shims/platform_view_registry_dart_ui_web.dart => dart:html

`

Thank you

github-actions[bot] commented 4 months ago

👋 @The-RootCause

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

josh-burton commented 2 months ago

Wasm is now stable in Flutter 3.22.0 so would be great to support it.

nietsmmar commented 1 month ago

Eagerly waiting for this :)

zh4ngx commented 1 week ago

Same. Looks like there's documentation on migration - should be somewhat simplifying / net deletion of code & imports :) https://dart.dev/interop/js-interop https://dart.dev/interop/js-interop/package-web