flutter_widget_from_html icon indicating copy to clipboard operation
flutter_widget_from_html copied to clipboard

Flutter 3.38 WASM failing to compile

Open pauuceda opened this issue 1 month ago • 1 comments

Steps to Reproduce

HTML
`HtmlWidget` configuration
HtmlWidget(
  state.message!,
  textStyle: GoogleFonts.roboto(
    fontSize: 16,
    color: Theme.of(context).colorScheme.tertiary,
  ),
)
Tesing environment
[√] Flutter (Channel stable, 3.38.3, on Microsoft Windows [Versi¢n 10.0.26200.7171], locale es-ES) [367ms]
    • Flutter version 3.38.3 on channel stable at C:\Users\pauuc\fvm\versions\3.38.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 19074d12f7 (8 days ago), 2025-11-20 17:53:13 -0500
    • Engine revision 13e658725d
    • Dart version 3.10.1
    • DevTools version 2.51.1
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets,
      omit-legacy-version-file, enable-lldb-debugging

[√] Windows Version (11 Pro 64-bit, 25H2, 2009) [1.100ms]

[√] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [2,2s]
    • Android SDK at C:\Users\pauuc\AppData\Local\Android\sdk
    • Emulator version 36.2.12.0 (build_id 14214601) (CL:N/A)
    • Platform android-36.1, build-tools 36.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.8+-14196175-b1038.72)
    • All Android licenses accepted.

[√] Chrome - develop for the web [82ms]
    • Chrome at C:\Users\pauuc\AppData\Local\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2026 18.0.2) [81ms]
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\18\Community
    • Visual Studio Community 2026 version 18.0.11222.15
    • Windows 10 SDK version 10.0.26100.0

[√] Connected device (3 available) [261ms]
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Versi¢n 10.0.26200.7171]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 142.0.7444.176
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 142.0.3595.94

[√] Network resources [378ms]
    • All expected network resources are available.

• No issues found!

Expected results

Since Flutter 3.38 update, my application is failing to compile to WebAssembly as it throws this error related to flutter_widget_from_html: type 'NullConstant' is not a subtype of type 'IntConstant' in type cast

Actual results

Failed to compile

pauuceda avatar Nov 28 '25 20:11 pauuceda

Thanks to #1529 from @lemz90, we fixed an issue with wasm build but it seems to cause a different issue with Android/iOS build. I guess we can release a beta version for now, to see whether it works with your app. Before investigating further...

daohoangson avatar Nov 29 '25 13:11 daohoangson

Just tried to compile to WASM with Flutter 3.38.6 and flutter_widget_from_html 0.17.1 and it worked! Flutter team might have changed something related to the cause of this problem, so I guess this issue can be closed.

pauuceda avatar Jan 11 '26 16:01 pauuceda

Just tried to compile to WASM with Flutter 3.38.6 and flutter_widget_from_html 0.17.1 and it worked! Flutter team might have changed something related to the cause of this problem, so I guess this issue can be closed.

Yes, its working for me now as well without the patch on 3.38.6 and 0.17.1.

lemz90 avatar Jan 12 '26 15:01 lemz90