Skip to main content

Directory Layout

The lib/ Directory

Cache Layer

The most important directory:

Entry Points

  • main_development.dart - Development mode
  • main_staging.dart - Staging mode
  • main_production.dart - Production mode
All call bootstrap.dart for initialization.

Key Files

bootstrap.dart

App initialization:

pubspec.yaml

Dependencies include:

Best Practices

  1. Feature-based folders - Group by feature, not type
  2. Barrel exports - Use index.dart or *.dart for clean imports
  3. Separation of concerns - UI, business logic, data layers separate
  4. Dependency injection - Inject repositories into blocs/cubits