đ Welcome! In this tutorial, you will:
This tutorial assumes you are using AndroidStudio to develop your app.
Install the
npm install -g @aws-amplify/cli
npm install -g @aws-amplify/cli
Note: Because weâre installing the Amplify CLI globally, you might need to run the command above with
sudo
depending on your system policies.
curl -sL https://aws-amplify.github.io/amplify-cli/install | bash && $SHELL
curl -sL https://aws-amplify.github.io/amplify-cli/install | bash && $SHELL
curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o install.cmd && install.cmd
curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o install.cmd && install.cmd
Sign up for an AWS account
If you donât already have an AWS account, youâll need to create one in order to follow the steps outlined in this tutorial.
There are no upfront charges or any term commitments to create an AWS account and signing up gives you immediate access to the AWS Free Tier.
Create a new project using Flutter CLI:
flutter create todo
flutter create todo
Or using Android Studio. Select + Start a new Flutter project.
In Select a Project Template, select Flutter Application. Press Next.
Next, configure your project:
Android Studio will open your project with a tab opened to main.dart
ios/Podfile
and change the second line to be `platform :ios, â11.0â.
android/app/src/main/AndroidManifest.xml
and change the line starting with
minSdkVersion
to be
minSdkVersion 21
. You now have an empty Flutter project into which youâll add Amplify in the next steps.
Amplify for Flutter is distributed via pub.dev.
pubspec.yaml
and add the following 3 dependencies below the line âsdk:flutterâ.
dependencies:
flutter:
sdk: flutter
amplify_flutter: '<1.0.0'
amplify_auth_cognito: '<1.0.0'
amplify_analytics_pinpoint: '<1.0.0'
dependencies:
flutter:
sdk: flutter
amplify_flutter: '<1.0.0'
amplify_auth_cognito: '<1.0.0'
amplify_analytics_pinpoint: '<1.0.0'
Run Flutter Pub Get
Android Studio requires you to sync your project with your new configuration. To do this, you can click Flutter in the notification bar above the file editor.
Alternatively, you can open a terminal window, cd into your projectâs root directory (where your pubspec.yaml is) and run:
flutter pub get
flutter pub get
When complete, you will see Process finished with exit code 0 in the output of the Messages tab at the bottom of your screen.
You are ready to start building with Amplify! đ