A comprehensive Flutter development environment with DevContainer templates and project creation tools.
FlutterBench is standardizing on the layered workBenches model:
- Layer 0:
workbench-base:{user} - Layer 1a:
devbench-base:{user} - Layer 2:
flutter-bench:{user}(bench-specific tools)
Any monolithic .devcontainer/ Dockerfiles are deprecated. The layered images are the source of truth going forward.
FlutterBench provides two ways to create Flutter projects with DevContainer support:
- π€ Automated Setup - Use
new-flutter-project.shfor quick, standardized project creation - π§ Manual Setup - Copy templates manually for maximum customization control
flutterBench/
βββ scripts/
β βββ new-flutter-project.sh # Automated project creation
β βββ new-dartwing-project.sh # DartWing project creation
β βββ update-flutter-project.sh # Update existing projects
β βββ launch-devbench.sh # Launch development container
β βββ start-monster.sh # Container startup script
βββ templates/
β βββ flutter-devcontainer-template/ # DevContainer template
β βββ .devcontainer/ # VS Code DevContainer config
β βββ .vscode/ # VS Code settings & tasks
β βββ scripts/
β β βββ manual-setup-project.sh # Manual setup validation
β β βββ README.md # Script usage guide
β βββ .env.example # Environment template
β βββ README.md # Template documentation
βββ docs/ # Additional documentation
Best for: New projects, standardized setup, quick start
# Navigate to flutterBench scripts
cd /path/to/workBenches/devBenches/flutterBench/scripts
# Create new Flutter project with DevContainer
./new-flutter-project.sh my-flutter-app
# Or specify custom target directory
./new-flutter-project.sh my-flutter-app ~/projects/special-projectsWhat it does automatically:
- β
Creates Flutter project using
flutter create - β Copies and configures DevContainer template
- β
Sets up environment variables (
.env) - β Configures user UID/GID for proper permissions
- β Sets up infrastructure paths
- β Includes specKit for spec-driven development
- β Ready to open in VS Code
Best for: Existing projects, template customization, learning/understanding
# 1. Create or navigate to your Flutter project
flutter create my-flutter-app # or use existing project
cd my-flutter-app
# 2. Copy template files
TEMPLATE_PATH="/path/to/workBenches/devBenches/flutterBench/templates/flutter-devcontainer-template"
cp -r "$TEMPLATE_PATH/.devcontainer" .
cp -r "$TEMPLATE_PATH/.vscode" .
cp -r "$TEMPLATE_PATH/scripts" .
cp "$TEMPLATE_PATH/.env.example" .
# 3. Set up environment configuration
cp .env.example .env
# Edit .env file with your project settings...
# 4. Validate setup (IMPORTANT!)
./scripts/manual-setup-project.shWhen to use manual setup:
- β Adding DevContainer to existing Flutter project
- β Need to customize template before applying
- β Working with non-standard directory structure
- β Want to understand how the template works
- β Debugging container configuration issues
| Feature | Automated Setup | Manual Setup |
|---|---|---|
| Speed | β‘ Fast (single command) | π’ Multiple steps required |
| Control | π― Standardized | π§ Full customization |
| Validation | β Built-in | π Manual validation required |
| Learning | π¦ Black box | π Educational |
| Best For | New projects | Existing projects, customization |
| Difficulty | π’ Easy | π‘ Intermediate |
./scripts/manual-setup-project.shThis script:
- π Creates
.envfrom.env.exampleif missing - β Validates all required environment variables
- π§ Checks variable formats and values
- π³ Verifies Docker environment
- π Tests container configuration
- ποΈ Validates infrastructure paths
π For detailed manual setup guidance, see templates/flutter-devcontainer-template/scripts/README.md
- β Creating a new Flutter project from scratch
- β You want standard workBenches project structure
- β You need to get started quickly
- β You trust the default configuration
- β You're new to DevContainers
- β Adding DevContainer to existing Flutter project
- β You need custom template modifications
- β Working with unique directory structures
- β You want to learn how DevContainers work
- β Debugging container issues
- β You need maximum control over the setup process
Key Principle: The .env file is the single source of truth for ALL project and user-specific configuration.
- β
Template files remain untouched -
devcontainer.json,docker-compose.yml, etc. are never modified - β All customization via environment variables - container names, user settings, versions, ports
- β
Project-specific settings isolated - each project has its own
.envfile - β Easy template updates - template improvements don't conflict with your settings
# .env file controls everything:
PROJECT_NAME=dartwing
APP_CONTAINER_SUFFIX=app # Results in: dartwing-app
SERVICE_CONTAINER_SUFFIX=gateway # Results in: dartwing-gateway
USER_UID=1000
FLUTTER_VERSION=3.24.0
COMPOSE_PROJECT_NAME=dartwingersResult: Template files use ${PROJECT_NAME}-${APP_CONTAINER_SUFFIX} β resolves to dartwing-app
Regardless of which setup method you used:
- Open in VS Code:
code . - Reopen in Container: Click prompt or Ctrl+Shift+P β "Dev Containers: Reopen in Container"
- Wait for build: First time takes 2-5 minutes
- Start coding: Container includes Flutter SDK, Android tools, and VS Code extensions
scripts/new-flutter-project.sh- Create new Flutter project with DevContainerscripts/new-dartwing-project.sh- Create new DartWing project variant
scripts/update-flutter-project.sh- Update existing project to latest templatetemplates/.../scripts/manual-setup-project.sh- Validate manual setup
scripts/launch-devbench.sh- Launch development containerscripts/start-monster.sh- Start container infrastructure
templates/flutter-devcontainer-template/README.md- Template detailstemplates/flutter-devcontainer-template/scripts/README.md- Manual setup guidedocs/env-file-docker-compose-guide.md- Environment configuration guide
The DevContainer template includes:
- π³ Lightweight container (~500MB vs 2GB+ FlutterBench)
- π§ Centralized configuration - ALL project and user settings in
.envfile only - π No template file modification - template files remain untouched, use environment variables
- π·οΈ Configurable container naming - customize app and service container names via
.env - π± Shared ADB infrastructure (connects to external ADB server)
- βοΈ VS Code integration (tasks, launch configs, extensions)
- ποΈ Proper user permissions (UID/GID matching)
- π Hot reload support (port forwarding configured)
- π§ͺ Testing support (launch configurations)
- π Spec-driven development (includes specKit)
- FlutterBench = Heavy development workbench (~2GB, all tools)
- Project Containers = Lightweight project-specific environment (~500MB)
Use FlutterBench for heavy development, project containers for debugging and light development.