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

Web support for amplify-flutter

Open FadilaNuzha opened this issue 4 years ago • 243 comments

Bug Description I created a simple web app to connect to AWS amplify.

image

But it's throwing the below error.

image

I have tried 'flutter clear', 'pub get' and creating a whole new project, but nothing works.

To Reproduce Steps to reproduce the behavior:

  1. Follow steps as shown as 'https://aws.amazon.com/getting-started/hands-on/build-flutter-app-amplify/'
  2. flutter run -d chrome

Expected behavior Console should print 'Successfully configured Amplify 🎉'

Platform [] Flutter Web

Smartphone (please complete the following information):

  • Browser [e.g. chrome ]
  • Version [Version 86.0.4240.198 (Official Build) (64-bit)]

FadilaNuzha avatar Dec 04 '20 09:12 FadilaNuzha

Hi @FadilaNuzha - We don't support Flutter web yet, but we know that this (as well as desktop support) is something that is desired. I'm marking this issue as a feature request.

haverchuck avatar Dec 04 '20 17:12 haverchuck

(For those who are interested, support for Flutter Desktop is being tracked separately, in #133.)

jamesonwilliams avatar Dec 04 '20 17:12 jamesonwilliams

Hi @FadilaNuzha - We don't support Flutter web yet, but we know that this (as well as desktop support) is something that is desired. I'm marking this issue as a feature request.

Hi @haverchuck, I tried this in an Android device and the emulator as well. Still I'm unable to configure Amplify. So I'll rename the issue. Am I missing something in the process?

FadilaNuzha avatar Dec 07 '20 07:12 FadilaNuzha

Hi @FadilaNuzha - We don't support Flutter web yet, but we know that this (as well as desktop support) is something that is desired. I'm marking this issue as a feature request.

Hi @haverchuck, I tried this in an Android device and the emulator as well. Still I'm unable to configure Amplify. So I'll rename the issue. Am I missing something in the process?

Actually it started working with the emulator, so I guess it's a web issue.

FadilaNuzha avatar Dec 07 '20 07:12 FadilaNuzha

:+1: +1 I came across the same issue while migrating my Flutter PWA application to Amplify, I'm glad someone (@haverchuck ) is working on it.

kenspy avatar Dec 29 '20 18:12 kenspy

+1 for web

Thanks for working on this

natedenh avatar Jan 25 '21 15:01 natedenh

Web support for amplify flutter would be something I would vote for.

shar154 avatar Feb 07 '21 00:02 shar154

I already voted for this but also want to show some support for this topic. Personally, I prefer using a PWA than installing a full application on my computer.

Web is a super fast and easy way to make your service available on a broad range of devices and onboard new users who can, later on, download the app. But it reduces the burden for them to start using the product in the first place significantly.

Example: I don't have an Amazon app on my computer and I wouldn't install it if it would be available, but I use my computer all the time to shop on Amazon.

What you should also consider is that users can:

  • use the web service on Mac, Windows, Linux, and any other OS that has a modern web browser,
  • install the PWA on their devices (including Desktop).

Therefore I would work on this integration before I start supporting native Desktop OS, but that's just my opinion and I don't want to offend anybody with it!

Thank you so much for working on these topics! Cannot wait to get it on my hands! So far you did a wonderful job with the Flutter SDK :)

bjoerndotsol avatar Feb 18 '21 06:02 bjoerndotsol

+1 for web support

roberthelmick08 avatar Feb 23 '21 20:02 roberthelmick08

+1... Amplify would set the tone for Flutter web as currently even Firebase seems to only have experimental support for web apps with Flutter... seems like a workaround for using Cognito has been developed in Dart - https://pub.dev/packages/amazon_cognito_identity_dart_2

rdamus avatar Feb 28 '21 16:02 rdamus

+1 for web support

drowl-developer avatar Mar 08 '21 23:03 drowl-developer

+1 for web support

capraqua avatar Mar 15 '21 10:03 capraqua

For those that just connect Amplify to a github repo for simple hosting, I got it working with the following build settings...

version: 1
frontend:
  phases:
    preBuild:
      commands:
      - git clone https://github.com/flutter/flutter.git -b stable --depth 1
      - export PATH="$PATH:`pwd`/flutter/bin"
    # IMPORTANT - Please verify your build commands
    build:
      commands: 
      - flutter build web -t ./lib/main.dart
  artifacts:
    # IMPORTANT - Please verify your build output directory
    baseDirectory: build/web
    files:
      - '**/*'
  cache:
    paths: []

stuartwk avatar Mar 15 '21 16:03 stuartwk

+1 for web support Thanks for working on this

clinsign avatar Mar 17 '21 02:03 clinsign

+1 for web support (this was actually the reason we wanted to use Flutter)

mheinis avatar Mar 18 '21 15:03 mheinis

+1 for supporting Flutter Web. We would like to use all platforms for which Flutter is available. But on web is our main goal.

roelvandenbranddvc avatar Mar 22 '21 06:03 roelvandenbranddvc

+1 for supporting Flutter Web :-)

BasKroes avatar Mar 22 '21 10:03 BasKroes

+1

gauravmehta13 avatar Mar 24 '21 16:03 gauravmehta13

+1

ghost avatar Mar 24 '21 16:03 ghost

The community has currently built (at least) two pure-Dart libraries to interact with Cognito from Flutter Web:

  • https://github.com/jonsaw/amazon-cognito-identity-dart/
  • https://github.com/furaiev/amazon-cognito-identity-dart-2/

Additionally, here's a customer asking about Flutter web support for Cognito on StackOverflow:

https://stackoverflow.com/questions/66796518/how-to-login-with-cognito-in-flutter-web

jamesonwilliams avatar Mar 25 '21 18:03 jamesonwilliams

+1

dedvalson avatar Mar 26 '21 20:03 dedvalson

+1

bluesky2091 avatar Mar 28 '21 13:03 bluesky2091

+1

deekob avatar Mar 29 '21 09:03 deekob

+1 🙏

bobosette avatar Mar 29 '21 18:03 bobosette

+1

matthewchung74 avatar Mar 31 '21 23:03 matthewchung74

+1, Since Flutter Web is not Stable, this feature is very much required.

gnumonk avatar Apr 03 '21 04:04 gnumonk

+1 Just want to stress that the strength of flutter is cross platform and that equal support of the major platforms Android, IOS and WEB is essential for the success of flutter and amplify. Especially HUGE companies like AWS should be able to provide up to date versions of their products supporting major milestones like Flutter 2. Web and nullish is really a basic essential to be supported.

BerndWessels avatar Apr 05 '21 19:04 BerndWessels

I'm very sad, but just switched to firebase because I need web support.

matthewchung74 avatar Apr 06 '21 21:04 matthewchung74

I'm very sad, but just switched to firebase because I need web support.

Sad indeed... My projects are on hold until they release support for web. For some reason, I have more confidence in Amplify than Firebase.

kenspy avatar Apr 07 '21 00:04 kenspy

+1

danielvtan avatar Apr 07 '21 06:04 danielvtan