<One sentence: what this Flutter app does and which platforms it targets.>
Stack
-
Flutter (stable channel) + Dart; state management: <Riverpod Bloc Provider> - Navigation:
; networking: <dio | http>; codegen: <freezed, json_serializable>
Commands
- Get packages:
flutter pub get - Run:
flutter run -d <device> - Analyze:
flutter analyze - Tests:
flutter test(one:flutter test test/features/cart/cart_test.dart) - Codegen:
dart run build_runner build --delete-conflicting-outputs - Format:
dart format .
Layout
lib/features/<feature>/(data, domain, presentation) ;lib/core/shared services, theme, routing
Rules
- Widgets stay small; extract widgets instead of helper methods that return widgets.
- Use
constconstructors wherever possible. - No business logic in widgets; it lives in <providers/blocs> and is unit tested.
- Never edit
*.g.dartor*.freezed.dartfiles; change the source and rerun codegen. - Handle loading, error and empty states for every async view.
- Accessibility:
Semanticslabels for icon-only buttons, text scales with system font size, tap targets at least 48x48 logical pixels (Material guideline). - Platform-specific code goes behind an interface; check both iOS and Android behavior.
Definition of done
flutter analyzeclean,flutter testpasses, codegen up to date.