Senior Flutter skill using FVM. Enforces project-specific standards: Provider, Layer-First Architecture, Stream-based Services, and strict coding conventions.
CRITICAL: Do NOT use the global flutter command.
.fvmrc or .fvm/fvm_config.json in the root.fvm flutter <command>.fvm flutter --version and match it against the version defined in .fvmrc.fvm install <version> then fvm use <version>.Do NOT use Feature-First. Adhere to the existing Layer-First structure:
lib/
├── api/ # Retrofit API clients and models
│ ├── models/ # Auto-generated json_serializable models
│ └── *_api.dart # Retrofit interfaces
├── components/ # Reusable UI widgets
├── screens/ # Screens organized by feature area
│ ├── tabs/ # Main bottom nav screens
│ ├── auth/ # Auth screens
│ └── ...
├── constants.dart # App-wide constants/theme
└── *Service.dart # Core business logic (Singleton Services)
The project uses a hybrid approach. Do NOT introduce Riverpod or Bloc.
AuthService, CartService).
StreamController.broadcast).StreamSubscription in StatefulWidget to listen to service events.Provider (minimal usage) specifically for injecting dependencies or simple UI state synchronization at the root.lib/api/*_api.dart.json_serializable in lib/api/models/.fvm flutter pub run build_runner build
Use standard Navigator 1.0.
onGenerateRoute in main.dart.BottomTabNavigation (or similar main wrapper).Navigator.of(context).pushNamed(...).Use the simplified extensions from lib/components/Utils.dart instead of manual formatting.
price.currency (e.g., 100.currency → “RM 100.00”)date.shortDate, date.longDate, date.timeago.str.capitalize.For navigation without a context (e.g., inside Services), use the global key:
import 'package:storeapp/components/Utils.dart';
// ...
navKey.currentState?.pushNamed(...);
showMessage(context, ...) from Dialogs.dart for alerts/snackbars.FirebaseCrashlytics.instance.recordError(error, stack, fatal: false);
Adhere strictly to flutter_lints rules defined in analysis_options.yaml. Run fvm flutter analyze to verify.
fvm flutter analyze regularly.fvm flutter test for unit tests../ship-android.sh./ship-ios.sh