Reputation: 31
We are building a Flutter app which for Web, Android and iOS. We plan to use AWS for backend using services like Cognito, Dynamodb, S3 and few others.
We have tried to use to Amplify - but understand it is not yet available for Flutter web.
What is best way to connect with Cognito ? and then other services like Dynamodb, S3 etc in AWS
We tried https://pub.dev/packages/amazon_cognito_identity_dart and it is very slow and we are not able to connect.
Upvotes: 3
Views: 2292
Reputation: 1899
You should try the a packed based on the one you are mentioning: https://pub.dev/packages/amazon_cognito_identity_dart_2
It worked pretty well for me - I was able to use S3, Lambda, API Gateway, AppSync (with websockets) etc. Note that it does not support Data Store; and if you can live without it - it should work fine.
The only issue is - login is very slow on the web (not on android or ios), there is an open issue about it: https://github.com/furaiev/amazon-cognito-identity-dart-2/issues/123. There seems to be a solution for it now, you may give it a try.
Amplify team implemented Flutter support by using already existing Android and iOS libraries, and just doing the Flutter wrapper around it. I guess it helped them roll it out much faster; but the proper solution (in my opinion) would be to re-write the JavaScript libraries in Dart, and have it compile natively to iOS, Android, Web and all other platforms. My guess is this will come in the future; Amplify Flutter is still in version 0.x.x.
Upvotes: 2