A modern Flutter application built with Clean Architecture and a feature-first project structure.
The application demonstrates scalable Flutter development practices through plant discovery, onboarding, search, premium paywall, theme support, localization, and in-app web content.
- Technical Highlights
- Application Features
- Architecture
- Tech Stack
- Project Structure
- Getting Started
- Environment Configuration
- Running the App
- Code Generation
- Testing
- Design
- Screenshots
- Demo Video
- Code Style
- Author
- Clean Architecture principles
- Feature-first project structure
- State management with Cubit and BLoC
- Dependency injection with
get_it - Declarative navigation with
auto_route - API integration with
dio - Functional error handling with
dartz - JSON serialization with code generation
- Centralized error and failure management
- Development and production environment configurations
- Responsive layouts with
flutter_screenutil - Light and dark theme support
- Localization support
- Reusable UI components
- Centralized logging
- In-app WebView support
- Accessibility with semantic widgets
- Browse more than 3,000 plant categories
- Search plant categories by name
- View plant-related questions and care content
- Open external content inside the application with WebView
- Splash and onboarding flow
- Get Started and onboarding screens
- Premium paywall experience
- Responsive Material Design 3 interface
- Light and dark themes
- System theme preference detection
- Hero animations and custom page transitions
- Semantic labels for screen-reader accessibility
The main application flow is:
Splash
└── Get Started
└── Onboarding
└── Paywall
└── Home
The bottom navigation bar contains:
- Home
- Diagnose
- Garden
- Profile
The project follows Clean Architecture principles with a feature-first structure.
Each feature is separated into three primary layers:
Contains application-independent business rules.
- Entities
- Use cases
- Repository interfaces
Handles communication with external and local data sources.
- API services
- Data sources
- Data models
- Mappers
- Repository implementations
Contains the user interface and presentation logic.
- Pages
- Widgets
- Cubits and BLoCs
- States
- UI models
Contains functionality shared across the entire application.
- Dependency injection
- Networking
- Routing
- Environment configuration
- Error handling
- Logging
- Base use cases
- Extensions and utilities
The project uses:
flutter_blocfor Cubit and BLoC-based state managementequatablefor value equality in state classes
| Package | Purpose |
|---|---|
Flutter SDK ^3.9.2 |
Application framework |
flutter_bloc ^9.1.1 |
State management |
auto_route ^11.0.0 |
Declarative routing |
dio ^5.9.0 |
HTTP client |
get_it ^9.2.0 |
Dependency injection |
flutter_screenutil ^5.9.0 |
Responsive layouts |
shared_preferences ^2.3.2 |
Local storage |
equatable ^2.0.7 |
Value equality |
dartz ^0.10.1 |
Functional error handling with Either |
google_fonts ^6.3.3 |
Custom fonts |
webview_flutter ^4.13.0 |
In-app web content |
| Package | Purpose |
|---|---|
flutter_lints ^6.0.0 |
Dart and Flutter lint rules |
build_runner ^2.4.9 |
Code generation |
auto_route_generator ^10.4.0 |
Route generation |
json_serializable ^6.11.3 |
JSON serialization generation |
lib/
├── core/
│ ├── config/ # Application initialization
│ ├── di/ # Dependency injection
│ ├── environment/ # Development and production configuration
│ ├── error/ # Exceptions, failures, and error handling
│ ├── network/ # Dio client and network interceptors
│ ├── router/ # AutoRoute configuration
│ ├── usecase/ # Base use case definitions
│ └── utils/ # Logger and utility classes
│
├── features/
│ ├── categories/
│ │ ├── data/
│ │ ├── domain/
│ │ └── presentation/
│ │
│ ├── questions/
│ ├── onboarding/
│ ├── home/
│ ├── paywall/
│ ├── splash/
│ ├── diagnose/
│ ├── garden/
│ └── profile/
│
└── shared/
├── resource/ # Colors, typography, values, and assets
├── theme/ # Light and dark theme configuration
└── widgets/ # Reusable widgets
Before running the project, make sure the following tools are installed:
- Flutter SDK
^3.9.2 - Dart SDK
- Android Studio or Visual Studio Code
- Flutter and Dart editor extensions
- Xcode for iOS development on macOS
- Clone the repository:
git clone https://github.com/senaecelik/flutter_clean_arch_demo_project.git
cd flutter_clean_arch_demo_project- Install the project dependencies:
flutter pub get-
Configure the required environment values.
-
Generate the required source files:
dart run build_runner build --delete-conflicting-outputs- Run the application:
flutter runThe project supports environment-specific configurations.
lib/core/environment/
├── dev_env.dart
└── prod_env.dart
The active configuration contains values such as:
- API base URL
- Development-specific settings
- Production-specific settings
https://dummy-api-jtg6bessta-ey.a.run.app
GET /getCategoried
GET /getQuestions
Before running the project, verify that the required environment values are configured correctly.
Do not commit private API keys, secrets, or credentials to the repository.
flutter devicesflutter runflutter run -d <device-id>flutter build apk --releaseflutter build ios --releaseCode generation is used for:
- AutoRoute route definitions
- JSON serialization
- Generated environment configuration
dart run build_runner build --delete-conflicting-outputsdart run build_runner watch --delete-conflicting-outputsdart run build_runner cleanThe testing infrastructure is currently under development.
Planned test coverage includes:
- Unit tests for use cases and Cubits
- Repository tests
- Widget tests for reusable UI components
- Integration tests for critical application flows
Tests can be executed with:
flutter testThe user interface is based on the following Figma design:
The implementation focuses on:
- Responsive layouts
- Reusable components
- Consistent spacing and typography
- Light and dark theme compatibility
- Accessibility
- Smooth page transitions
project-video.mov
The project follows the official Flutter and Dart style guidelines.
flutter_lintsis enabled- Consistent file and class naming conventions are used
- Features are separated by responsibility
- Reusable widgets are preferred over duplicated UI code
- Comments are used only when additional context is necessary
Run static analysis with:
flutter analyzeFormat the project with:
dart format .Sena Ercihan Çelik
- GitHub: senaecelik
- LinkedIn: senaecelik
- Medium: @senaecelik






