supabase-community / flutter-auth-ui

Supabase Auth UI library for Flutter
https://supabase.com
MIT License
114 stars 58 forks source link

WASM build support #92

Closed geoextra closed 5 months ago

geoextra commented 6 months ago

Bug report

Describe the bug

A project cannot be compiled using flutter build web --wasm since the transitive dependency sign_in_with_apple_web doesn't support the new js interop bindings. This is caused by an outdated dependency version of sign_in_with_apple and is fixed with the latest version.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Upgrade to Flutter 3.22.0
  2. Install supabase_auth_ui dependency
  3. Build with flutter build web --wasm

Example error message:

[...]/Cache/hosted/pub.dev/sign_in_with_apple_web-1.0.1/lib/sign_in_with_apple_web.dart:8:1: 
Error: JS interop library 'package:js/js_util.dart' can't be imported when compiling to Wasm.
Try using 'dart:js_interop' or 'dart:js_interop_unsafe' instead.
import 'package:js/js_util.dart';

Expected behavior

Compilation should be possible with upgraded dependencies. Unfortunatly, I cannot test this.

geoextra commented 5 months ago

Fixed with recent pull request.