Production-ready Flutter starter based on patterns from BabyTime mobile app, cleaned for reuse.
- Flutter stable / Dart 3
- Riverpod for dependency injection and state
- GoRouter for navigation
- Dio API client with auth headers and safe token refresh
- SharedPreferences + Flutter Secure Storage
- Optional Firebase Core, FCM, and local notifications
- Strict linting and CI
flutter pub get
flutter run --dart-define=API_BASE_URL=https://api.example.com --dart-define=API_VERSION=v1- Click Use this template on GitHub.
- Rename package IDs:
- Android:
android/app/build.gradle.ktsnamespaceandapplicationId - iOS: Runner bundle identifier in Xcode
- Android:
- Configure Firebase if needed:
dart pub global activate flutterfire_cli
flutterfire configure- Run checks:
flutter pub get
flutter analyze
flutter test| Key | Default | Purpose |
|---|---|---|
APP_NAME |
Flutter Boilerplate |
App title |
API_BASE_URL |
https://api.example.com |
Backend base URL |
API_VERSION |
v1 |
API version path |
lib/
app/ # app widget, router, theme
core/
config/ # compile-time config
firebase/ # optional Firebase bootstrap and FCM
network/ # Dio client, interceptors, errors
storage/ # local and secure storage
features/ # feature-first modules
Firebase is optional. App builds without Firebase config; bootstrap catches missing native config and keeps app running.