Page updated Nov 21, 2023

Set up fullstack project

Set up your application

Create a new Flutter application

Create a new project using Flutter CLI:

flutter create budget_tracker
1flutter create budget_tracker

Add Amplify to your application

Amplify Flutter is distributed via

  1. From your project root directory, find and modify your pubspec.yaml and add the Amplify plugins to the project dependencies.

    environment: sdk: ">=2.18.0 <3.0.0" dependencies: amplify_api: ^1.0.0 amplify_auth_cognito: ^1.0.0 amplify_authenticator: ^1.0.0 amplify_flutter: ^1.0.0 flutter: sdk: flutter go_router: ^6.5.5
    2 sdk: ">=2.18.0 <3.0.0"
    5 amplify_api: ^1.0.0
    6 amplify_auth_cognito: ^1.0.0
    7 amplify_authenticator: ^1.0.0
    8 amplify_flutter: ^1.0.0
    9 flutter:
    10 sdk: flutter
    11 go_router: ^6.5.5
  2. Install the dependencies by running the following command. Depending on your development environment, you may perform this step via your IDE (or it may even be performed for you automatically).

    flutter pub get
    1flutter pub get

Platform Setup

Depending on the platform you're building for, some extra set up may be required.

Amplify requires a minimum deployment target of 13.0 and Xcode 13.2 or higher when targeting iOS.

From your project root, navigate to the ios/ directory and open the Podfile in a text editor of your choice. At the top of the file, update the target iOS platform to 13.0 or higher.

platform :ios, '13.0'
1platform :ios, '13.0'

Open your project in Xcode and select Runner, Targets -> Runner and then the "General" tab. Under the "Minimum Deployments" section, update the iOS version to 13.0 or higher.

Setting the iOS version to 13.0 or higher in the minimum deployments section of the Runner general window.

Select Runner, Project -> Runner and then the "Info" tab. Update "iOS Deployment Target" to 13.0 or higher.

Setting the iOS version to 13.0 or higher in the deployment targets section of the Runner info window.