Production-ready Flutter mobile template for Android and iOS. It follows feature-first Clean Architecture, uses flutter_bloc with Cubit-first state management, and includes offline-first foundations, localization (English + Persian), and a sample feature.
- Clean Architecture split by features.
- Backend-agnostic with placeholder endpoints.
- Offline-first foundations with Drift + Sync Queue.
- GoRouter routing with auth-aware guards.
- GetIt + Injectable-ready DI.
lib/
app/
core/
features/
More detail in ARCHITECTURE.md.
flutter pub getflutter run
- Development:
flutter run -t lib/main_dev.dart - Staging:
flutter run -t lib/main_staging.dart - Production:
flutter run -t lib/main_prod.dart
dart run build_runner build --delete-conflicting-outputsdart run build_runner watch --delete-conflicting-outputs
Edit environment values in lib/app/config/app_flavor.dart.
- Create a feature folder under lib/features.
- Add
data,domain, andpresentationlayers. - Register feature dependencies in lib/app/di/injection.config.dart.
See OFFLINE_FIRST.md.
flutter test
See TESTING.md.
- Android:
flutter build apk --debug - iOS:
flutter build ios --debug
lib/app: bootstrap, DI, routing, config.lib/core: shared infrastructure (network, storage, database, theme, localization).lib/features: independent, removable features.
Internal template starter. Customize as needed.