amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

feat(auth): Support --wasm (#6350)

Open asaarnak opened this issue 3 months ago • 3 comments

  • 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.

asaarnak avatar Sep 12 '25 13:09 asaarnak

Hi @tyllark! Can you take a look at this? We try to use wasm on web. Thanks!

asaarnak avatar Sep 12 '25 13:09 asaarnak

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!

tyllark avatar Sep 12 '25 22:09 tyllark

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.

asaarnak avatar Sep 15 '25 07:09 asaarnak