aws-amplify / aws-amplify/amplify-hosting
[Feature Request] Flutter for Web support
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [X] I have removed any sensitive information from my code snippets and submission.
### Amplify Hosting feature
Frontend builds, One click deploy
### Is your feature request related to a problem? Please describe:
According to the StackOverflow survey in 2024, Flutter is the biggest cross-platform development SDK (with 9.4%) for building apps. Right now AWS Amplify does not support hosting Flutter Web applications.
### Describe how you'd like this feature to work
It can immediately understand if the Flutter app has Web support, deploy it by getting a build for it. We will have the Flutter SDK already loaded and ready to be used to build the app. With custom deployments this will work like the following:
```
version: 1
backend:
phases:
build:
commands:
- npm ci --cache .npm --prefer-offline
- npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID --outputs-format dart --outputs-out-dir lib
frontend:
phases:
preBuild:
commands:
- echo "Installing Flutter SDK"
- git clone https://github.com/flutter/flutter.git -b stable --depth 1
- export PATH="$PATH:$(pwd)/flutter/bin"
- flutter config --no-analytics
- flutter doctor
build:
commands:
- echo "Installing dependencies"
- flutter pub get
- echo "Building Flutter web application with WASM support"
- flutter build web
artifacts:
baseDirectory: build/web
files:
- '**/*'
cache:
paths:
- flutter/.pub-cache
```
Contributor guide
Research direction
Start with the custom deployment configuration in the issue and review the frontend preBuild and build phases. Check how Flutter SDK installation, `flutter pub get`, and `flutter build web` would fit the existing Amplify Hosting build flow, using `build/web` as the artifact directory. Done means Flutter Web applications can be detected, built, and deployed with the documented configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flutter
- Domain
- build-system, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100