feat(auth): Support --wasm (#6350)
- Replaced Platform.isAndroid with defaultTargetPlatform == TargetPlatform.android
Issue #6350
Removed the dart:io dependency from amplify_impl.dart
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Hi @tyllark! Can you take a look at this? We try to use wasm on web. Thanks!
Hello @asaarnak, were you able to use --wasm commands after overriding your amplify_flutter dependncy to point to your repository and branch? Here is an example override template I use:
dependency_overrides:
amplify_flutter:
git:
url: https://github.com/aws-amplify/amplify-flutter.git
ref: {BRANCH_NAME}
path: packages/amplify/amplify_flutter
We have additional references to dart:io that could impact our Auth and Storage categories when it comes to WASM support. If this change will unblock you we can look to get this PR merged sooner and migrate the other references later, otherwise we can use this PR as a starting point for this migration.
Thanks you for bringing to our attention the compatibility issue with dart:io and WASM!
Hei, your correrct, i didn't have time to test it then. I tested this now and got same error from amplify_auth_cognito. I'll try to see if i could get it running.