Directory Layout
The lib/ Directory
Cache Layer
The most important directory:| Path | Purpose |
|---|---|
cache/models/ | Data models (Wallet, Transaction, etc.) |
cache/repositories/ | Database operations |
cache/services/ | Sync logic |
cache_manager.dart | Main API for app code |
Entry Points
main_development.dart- Development modemain_staging.dart- Staging modemain_production.dart- Production mode
bootstrap.dart for initialization.
Key Files
bootstrap.dart
App initialization:pubspec.yaml
Dependencies include:Best Practices
- Feature-based folders - Group by feature, not type
- Barrel exports - Use
index.dartor*.dartfor clean imports - Separation of concerns - UI, business logic, data layers separate
- Dependency injection - Inject repositories into blocs/cubits

