Skip to content

A Flutter boilerplate project provides a starter Flutter project organized with Clean Architecture and SOLID principles. Supported by tool, so you can generate structure quickly

Notifications You must be signed in to change notification settings

fantasyrock2020/init-flutter-project

Repository files navigation

Flutter Clean Architecture Project

This project follows Clean Architecture principles and SOLID design patterns.

Use tools

chmod

cd .tools && chmod +x generate_model.sh generate_repository.sh generate_structure.sh
  • Generate Model
./generate_model.sh
  • Generate Repository
./generate_repository.sh
  • Generate Structure
./generate_structure.sh

Project Structure

lib/
├── core/
│   ├── bloc/
│   ├── constants/
│   ├── data/
│   │   ├── network/
│   │   └── share_pref/
│   ├── di/
│   ├── enums/
│   ├── extensions/
│   ├── routing/
│   └── services/
├── data/
│   ├── datasource/
│   │   ├── api/
│   │   └── local/
│   ├── models/
│   └── repositories/
├── domain/
│   ├── entities/
│   ├── repositories/
│   └── usecases/
├── features/
│   ├── auth/
│   │   ├── arguments/
│   │   ├── bloc/
│   │   └── widget/
│   └── home/
│       ├── arguments/
│       ├── bloc/
│       └── widget/
└── widget/

Getting Started

  1. Install dependencies:
flutter pub get
  1. Generate
dart run build_runner watch -d
  1. Run the app:
flutter run

Architecture Overview

This project follows Clean Architecture with three main layers:

  • Presentation: UI components, BLoC/Cubit for state management
  • Domain: Business logic, Use cases, Repository interfaces
  • Data: Repository implementations, Data sources, Models

Dependencies

  • get_it: Dependency injection
  • flutter_bloc: State management

Development

  • Follow SOLID principles
  • Keep layers independent and maintainable

About

A Flutter boilerplate project provides a starter Flutter project organized with Clean Architecture and SOLID principles. Supported by tool, so you can generate structure quickly

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published