Erengun/Flutter-Riverpod-Quickstart-Template
⚡️ Production-ready Flutter quick-start template — Riverpod, Freezed, GoRouter, Mason, API + Auth, one-command rename & icon.
- Stars
- 140
- Forks
- 19
- Last push (UTC)
- Sep 8, 2026
- Project status
- Active
Technical topics
Dependencies used
Dependency list 40 items
- flutter
{"sdk":"flutter"} - path_provider
^2.1.5 - flutter_displaymode
^0.7.0 - easy_localization
^3.0.7 - ionicons
^0.2.2 - cupertino_icons
^1.0.2 - flutter_riverpod
^3.3.2 - riverpod
^3.3.2 - dio
^5.9.0 - freezed_annotation
^3.1.0 - riverpod_annotation
^4.0.3 - logger
^2.5.0 - get_storage
^2.1.1 - gap
^3.0.1 - network_logger
^1.0.4 - json_annotation
^4.12.0 - go_router
^17.0.1 - fpdart
^1.1.0 - responsive_builder
^0.7.0 - flex_color_scheme
^8.0.2 - url_launcher
^6.1.11 - intl
^0.20.2 - stack_trace
^1.11.0 - google_fonts
^8.0.2 - android_id
^0.5.1 - hive_ce
^2.11.1 - device_info_plus
^12.4.0 - crypto
^3.0.6 - hive_ce_flutter
^2.3.0 - dio_smart_retry
^7.0.1 - dio_cache_interceptor
^4.0.5 - flutter_testDevelopment
{"sdk":"flutter"} - flutter_lintsDevelopment
^6.0.0 - build_runnerDevelopment
^2.10.4 - json_serializableDevelopment
^6.14.0 - riverpod_generatorDevelopment
^4.0.4 - riverpod_lintDevelopment
^3.1.4 - freezedDevelopment
^3.2.6-dev.1 - riderDevelopment
^0.0.1 - hive_ce_generatorDevelopment
^1.11.2
Rankings
Original README
English project snapshot. Visit GitHub for the latest content.
Expand / collapse project README
Flutter Riverpod Template - 2025 Edition
Modern Flutter Architecture Template with Riverpod
A production-ready Flutter template built with the latest packages and best practices, supporting Flutter 3.32 and above. This template implements clean architecture principles and provides a robust foundation for building scalable applications.
Key Features
- 🏗️ Clean Architecture with Domain-Driven Design
- 🎯 Riverpod 2.6+ with code generation
- 🔒 Built-in authentication pack with secure storage (Hive CE + AES-256)
- 🌐 Type-safe API integration with Dio 5.8+
- 📱 Responsive UI with adaptive widgets
- 🌍 Internationalization ready with Easy Localization
- 💾 Secure local storage with Hive CE
- 🧪 Pre-configured unit testing for authentication and controller logic
- ⚡ Modern navigation with GoRouter 14.8+
- 🛠️ Custom linting and devtools configuration
Tech Stack
Core Libraries:
- State Management: Riverpod 2.6.1, Freezed 3.0.6 (immutable state)
- Network Layer: Dio 5.8.0, FPDart 1.1.0 for functional error handling
- Local Storage: Hive CE 2.11.1 with AES-256 encryption
- UI & Navigation: GoRouter 14.8.0, Google Fonts 6.2.1, Material 3
Developer Tools:
- Flutter Lints 5.0.0
- Build Runner, code generation
- Custom linting rules (
lint_rules.yaml) - Dart & Flutter DevTools support
Project Structure
lib/
├── common/ # Shared widgets and components
├── config/ # App configuration (theme etc.)
├── constants/ # App-wide constants (endpoints, assets)
├── core/ # Core functionality, network layer
├── features/ # Feature modules (authentication, home, ...)
│ └── authentication/
│ ├── data/
│ ├── domain/
│ └── presentation/
├── hive/ # Local storage setup and adapters
├── router/ # Navigation & routing
├── utils/ # Utility functions
├── main.dart # App entry point
└── my_app.dart # App configuration
Getting Started
Setup
-
Clone the template:
git clone https://github.com/Erengun/Flutter-Riverpod-2.0-Template.git my_app cd my_app -
Install dependencies:
flutter pub get -
Generate code:
dart run build_runner build --delete-conflicting-outputs -
Setup environment:
cp .env.example .env -
Run the app:
flutter run --flavor prod -t lib/main_prod.dart
Flavors (app names & package IDs)
This template ships with dev, staging, and prod flavors for Android and iOS.
Run commands
- Dev:
flutter run --flavor dev -t lib/main_dev.dart - Staging:
flutter run --flavor staging -t lib/main_staging.dart - Prod:
flutter run --flavor prod -t lib/main_prod.dart
Customize names and IDs
- Android flavor names and applicationId suffixes: android/app/build.gradle.kts
- iOS bundle IDs and display names: ios/Flutter/Debug-dev.xcconfig (and the other flavor xcconfig files)
- Dart-side flavor labels: lib/flavors/app_flavor.dart
Authentication Module
The template includes a complete authentication system with secure credential storage and error handling.
How it works
- Login & Registration: Uses Dio to POST to
/api/loginand/api/registerendpoints. - Credential Caching: Credentials are securely cached in Hive CE using AES-256 encryption, with key derived per-device.
- State Management: All authentication UI and logic is managed via Riverpod notifiers and state classes.
- Error Handling: All network and validation errors are surfaced in the UI.
- Loading State: UI reflects loading and error states for a smooth UX.
Test Credentials
You can test the authentication functionality using these credentials from reqres.in:
Login:
{
"email": "eve.holt@reqres.in",
"password": "cityslicka"
}
Register:
{
"email": "eve.holt@reqres.in",
"password": "pistol"
}
Example:
@riverpod
class LoginController extends _$LoginController {
// ... state and logic here
Future<LoginResponse> login({required String email, required String password}) async {
// Handles login, error handling, caching, loading state etc.
}
}
Testing
- Integrated tests for auth controller logic (
test/features/login_controller_test.dart) - Run tests with:
flutter test
Documentation
- Up-to-date documentation in this README
- Code comments and examples throughout
Contributing
See our Contributing Guide for details on how to:
- Set up your development environment
- Run tests
- Submit pull requests
License
This project is licensed under the MIT License - see the LICENSE file for details.