NearHuscarl / flutter_login

Provides login screen with login/signup functionalities to help speed up development
MIT License
1.51k stars 799 forks source link

WASM and desktop (Linux, macOS, Windows) support #497

Open sashkent3 opened 3 months ago

sashkent3 commented 3 months ago

WebAssembly support for Flutter web has been available on the Flutter stable channel since Flutter 3.22. Please, consider adding WASM support to the package.

The issue currently lies with the intl_phone_number_input dependency which is not WASM compatible.

For anyone who wants to use flutter_login with WASM now, I made a simple fork which purges support for LoginUserType.intlPhone removing the problematic dependency.

sashkent3 commented 3 months ago

intl_phone_number_input itself doesn't support WASM (and also desktop platforms) because of a dependency on libphonenumber_plugin which can be easily replaced by a cross-platform dlibphonenumber package. I've opened a PR there which does exactly that.

If I'm not mistaken, intl_phone_number_input is also the only dependency blocking Linux, macOS and Windows support in flutter_login which would also be resolved by the PR.

You can check out a version of flutter_login which uses the PR version here. I'm happy to confirm that both Linux and WASM versions work as expected and pass all tests. I haven't tested macOS and Windows platforms.

sashkent3 commented 3 weeks ago

Since v0.8.0 intl_phone_number_input supports both WASM and desktop platforms. It would be great to see this in flutter_login as well.