A new brick created with the Mason CLI.
Generated by mason 🧱
This is a starting point for a new brick.
A few resources to get you started if this is your first brick template:
A modern Flutter starter template with a clean architecture, state management using Riverpod, and best practices for scalable applications.
The project follows a feature-first approach with a clear separation of concerns:
📁 lib/
├── 📁 app/
│ ├── 📁 common/
│ │ ├── 📁 widgets/ # Reusable widgets across the app
│ │ ├── 📁 services/ # Shared services
│ │ └── 📁 utils/ # Common utility functions and helpers
│ │
│ └── 📁 feature_example/ # Example of a feature module
│ ├── 📁 data/ # Data Layer
│ │ ├── 📁 datasources/ # API clients, local storage
│ │ ├── 📁 models/ # Data transfer objects (DTOs)
│ │ └── 📁 repositories/ # Repository implementations
│ │
│ ├── 📁 domain/ # Business Logic Layer
│ │ ├── 📁 entities/ # Core business objects
│ │ ├── 📁 repositories/ # Repository interfaces
│ │ └── 📁 usecases/ # Business logic units
│ │
│ └── 📁 presentation/ # UI Layer
│ ├── 📁 pages/ # Feature screens
│ ├── 📁 widgets/ # Feature-specific UI components
│ └── 📁 providers/ # State management
│
├── 📁 core/ # Core Infrastructure
│ ├── 📁 constants/ # App-wide constants and configurations
│ ├── 📁 extensions/ # Dart extension methods
│ ├── 📁 failures/ # Error handling classes
│ ├── 📁 http/ # HTTP client configuration
│ ├── 📁 router/ # Navigation setup (AutoRoute)
│ └── 📁 storage/ # Secure storage implementation
│
├── 📁 ui/ # Global UI Components
│ ├── 📁 theme/ # App theming
│ └── 📁 example/ # Example UI components
│
├── 📄 main.dart # Entry point
└── 📄 main_providers.dart # Global Riverpod providers
-
🏗️ Feature based
-
🚀 Riverpod for state management
-
🌐 Dio for HTTP requests
-
🗺️ AutoRoute for navigation
-
🔐 Secure storage
-
🎨 Customizable theme with Google Fonts
-
📱 Responsive design
-
🔍 Easy-to-follow folder structure
-
🧪 Example feature implementation
-
🌍 Internationalization with slang
-
📝 Form handling with reactive_forms (optional)
-
Clone this repository
-
Install mason
-
Run
mason make flutter_starter
-
Follow the feature-first approach
-
Use dependency injection with Riverpod
-
Implement proper error handling
-
Write clean and maintainable code
-
Follow Flutter's style guide
-
flutter_riverpod: State management
-
hooks_riverpod: Riverpod with hooks
-
flutter_hooks: Hooks-based state management
-
auto_route: Navigation and routing
-
dio: HTTP client
-
fpdart: Functional programming utilities
-
flutter_secure_storage: Secure storage
-
google_fonts: Typography
-
fluttertoast: Toast messages
-
shared_preferences: Local storage
-
slang: Internationalization
-
dart_mappable: Object mapping
-
reactive_forms: Form handling (optional)
-
build_runner: Code generation
-
riverpod_generator: Riverpod code generation
-
custom_lint: Custom lint rules
-
riverpod_lint: Riverpod lint rules
-
dart_mappable_builder: Object mapping code generation
-
auto_route_generator: AutoRoute code generation
-
slang_build_runner: Internationalization code generation
-
flutter_gen_runner: Asset generation