- Application code sits under
lib/, grouped by domain (lib/features/<feature>/) with shared utilities inlib/shared/, dependency wiring inlib/core/, and services inlib/services/. - Persistence, APIs, and background jobs live in
lib/data/andlib/background/; generated localization output is inlib/generated/and must stay untouched. - For logging, always use the pre-configured singleton
loggerinstance viaimport 'package:mostro_mobile/services/logger_service.dart';. Direct instantiation ofLogger()is no longer permitted. Refer todocs/LOGGING_IMPLEMENTATION.mdfor detailed guidelines. - Tests mirror the feature layout under
test/, end-to-end flows run fromintegration_test/, and platform wrappers reside inandroid/,ios/, andweb/. Additional guidance sits indocs/.
flutter pub get— sync Dart dependencies after pulling or switching branches.dart run build_runner build -d— regenerate localization, mocks, and models when ARB or annotated files change.flutter run— launch the app locally; specify-dto target a particular device or simulator.flutter analyze— enforce theflutter_lintsrule set; keep the tree warning-free.flutter format .— apply canonical Dart formatting before committing.flutter testandflutter test integration_test/— run unit/widget suites and full-stack scenarios respectively.
- Follow Dart formatter defaults (two-space indentation, trailing commas) and resolve every analyzer warning.
- Name Riverpod providers
<Feature>Provideror<Feature>Notifier, and keep feature assets inside their feature directory. - Localize all user-facing strings via ARB files and access them with
S.of(context)rather than hard-coded literals.
- Place unit tests beside their feature counterparts using the
*_test.dartsuffix; prefer Mockito fakes generated viabuild_runner. - Ensure integration coverage for flows touching networking, background work, or session recovery in
integration_test/. - Run
flutter testbefore pushing and add targeted scenarios when expanding complex logic or async workflows.
- Write concise, imperative commits, optionally prefixed with a scope (e.g.,
feat:,docs:), and squash to keep each change focused. - PR descriptions should capture intent, list key changes, link tracking issues, and flag risk areas; include command output for manual tests and screenshots for UI updates.
- Keep branches rebased, and reference relevant docs or tickets when requesting review.
-
Add a language specifier to every fenced code block. Static analysis (markdownlint MD040) flags blocks without a language identifier. Example:
flutter test