Skip to content

minisource/flutter-template

Flutter Template

Production-ready Flutter mobile template for Android and iOS. It follows feature-first Clean Architecture, uses flutter_bloc with Cubit-first state management, and includes offline-first foundations, localization (English + Persian), and a sample feature.

Overview

  • Clean Architecture split by features.
  • Backend-agnostic with placeholder endpoints.
  • Offline-first foundations with Drift + Sync Queue.
  • GoRouter routing with auth-aware guards.
  • GetIt + Injectable-ready DI.

Folder Structure

lib/
	app/
	core/
	features/

More detail in ARCHITECTURE.md.

Run the App

  • flutter pub get
  • flutter run

Environments

  • Development: flutter run -t lib/main_dev.dart
  • Staging: flutter run -t lib/main_staging.dart
  • Production: flutter run -t lib/main_prod.dart

Code Generation

  • dart run build_runner build --delete-conflicting-outputs
  • dart run build_runner watch --delete-conflicting-outputs

Environment Configuration

Edit environment values in lib/app/config/app_flavor.dart.

Add a New Feature

  1. Create a feature folder under lib/features.
  2. Add data, domain, and presentation layers.
  3. Register feature dependencies in lib/app/di/injection.config.dart.

Offline-First

See OFFLINE_FIRST.md.

Tests

  • flutter test

See TESTING.md.

Build

  • Android: flutter build apk --debug
  • iOS: flutter build ios --debug

Architecture Summary

  • lib/app: bootstrap, DI, routing, config.
  • lib/core: shared infrastructure (network, storage, database, theme, localization).
  • lib/features: independent, removable features.

License

Internal template starter. Customize as needed.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages