Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

How to create a Flutter app

An example full-stack serverless Flutter app created with SST.

Getting Started

Read the tutorial

Install the example.

$ npm init serverless-stack --example flutter-app
# Or with Yarn
$ yarn create serverless-stack --example flutter-app

Set the deployed API endpoint in Flutter. Create a .env file inside frontend\ with the following content:

DEV_API_URL=OUTPUT_FROM_SST_START
PROD_API_URL=OUTPUT_FROM_SST_DEPLOY

Replace OUTPUT_FROM_SST_START with the deployed API endpoint from running yarn run start; and replace OUTPUT_FROM_SST_DEPLOY with that from running yarn sst deploy.

Install the Flutter app.

$ cd frontend
$ flutter run

Commands

yarn run start

Starts the local Lambda development environment.

yarn run build

Build your app and synthesize your stacks.

Generates a .build/ directory with the compiled files and a .build/cdk.out/ directory with the synthesized CloudFormation stacks.

yarn run deploy [stack]

Deploy all your stacks to AWS. Or optionally deploy, a specific stack.

yarn run remove [stack]

Remove all your stacks and all of their resources from AWS. Or optionally removes, a specific stack.

yarn run test

Runs your tests using Jest. Takes all the Jest CLI options.

Documentation

Learn more about the Serverless Stack.

Community

Follow us on Twitter or post on our forums.