This project uses Flutter build flavors to generate and run three separate versions of the app:
- Instance A
- Instance B
- Instance C
Each version has its own entrypoint and configuration.
flutter run --flavor instanceA -t lib/main_a.dartflutter run --flavor instanceB -t lib/main_b.dartflutter run --flavor instanceC -t lib/main_c.dartflutter build apk --flavor instanceA -t lib/main_a.dart flutter build apk --flavor instanceB -t lib/main_b.dart flutter build apk --flavor instanceC -t lib/main_c.dart flutter build windows -t lib/main_a.dartTo run flavors easily in VS Code, use the predefined launch configurations in .vscode/launch.json.
Example launch configuration:
{
"version": "0.2.0",
"configurations": [
{
"name": "Instance A",
"request": "launch",
"type": "dart",
"program": "lib/main_a.dart",
"args": ["--flavor", "instanceA"]
},
{
"name": "Instance B",
"request": "launch",
"type": "dart",
"program": "lib/main_b.dart",
"args": ["--flavor", "instanceB"]
},
{
"name": "Instance C",
"request": "launch",
"type": "dart",
"program": "lib/main_c.dart",
"args": ["--flavor", "instanceC"]
}
]
}To use:
- Open the Run and Debug panel in VS Code.
- Select the desired configuration (e.g., "Instance A").
- Click
▶️ to launch.
- Flutter 3.7.3 (or compatible)
- Dart SDK 3.7+
- Android Studio or VS Code with Flutter plugin
- Android SDK (for building APKs)
lib/main_a.dartlib/main_b.dartlib/main_c.dart
Each entry file initializes an AppConfig and passes it to MyApp in lib/app.dart.
The shared app logic and UI lives in lib/app.dart, which builds the app according to the provided flavor configuration.