Prerequisites

  • Flutter 3.6+
  • Android Studio or Xcode (for device emulation)
  • Dart SDK (bundled with Flutter)

Quick Start

git clone https://github.com/EliaCoon/flow-mobile.git
cd flow-mobile
flutter pub get
flutter run

Package name is flow (renamed from flow_app). All imports use package:flow/....


Essential Commands

flutter pub get                                              # install deps + regenerate l10n
flutter pub run build_runner build --delete-conflicting-outputs  # code-gen (Riverpod/Freezed)
flutter analyze                                             # static analysis — must be zero issues
dart format .                                               # format
flutter run -d <device-id>                                  # run on specific device
flutter test                                                # all tests
flutter clean && flutter pub get && flutter run             # hard reset (clears build cache)

Always run flutter analyze before marking any task complete. Zero issues required.


Branch Strategy

BranchPurpose
mainProduction-ready. Never commit directly.
edit/mobile-audit-ux-polishCurrent active dev branch — all UI polish and auth rework
feat/*Feature branches off the active dev branch

Workflow: feat/my-feature → PR into edit/mobile-audit-ux-polish → reviewed → merged → main via release PR.


Worktrees — Current State (May 2026)

No active worktrees. The feat/design-system-v2 worktree at .worktrees/design-v2 has been fully merged into edit/mobile-audit-ux-polish and is no longer active.

All work happens in the main repo directory: C:\Users\elia-\Documents\flowproject\flow_mobile\

If worktrees are ever re-created, register them here with path and branch.


Code Architecture

lib/
├── core/           Shared infra (router, theme, constants, services, storage)
├── features/       Feature modules
│   └── <feature>/
│       ├── screens/    *_screen.dart
│       ├── notifiers/  *_notifier.dart  (StateNotifier)
│       └── providers/  *_provider.dart
├── shared/         Cross-feature (models, widgets, repos, services)
└── l10n/           ARB files + generated Dart

Key Patterns

  • ref.watch() for reactive UI, ref.read() for one-shot actions
  • StateNotifierProvider.autoDispose for wizard/form state (resets on pop)
  • All Supabase calls go through the client directly — no custom API gateway
  • Firebase guard: check NotificationService._firebaseAvailable before any FCM call
  • Errors: LogService.instance.log() — never print()

Adding a New Screen

  1. Create lib/features/<feature>/screens/<name>_screen.dart
  2. Add route in lib/core/router/app_router.dart
  3. Create notifier/provider if needed
  4. Run flutter analyze — zero issues
  5. Update ../flow_docs/content/mobile/features/<area>/<feature>.md (create if missing)

branch-strategy — commit conventions and PR workflow localization — l10n setup and import path