z-flutter-core
Installation
SKILL.md
Flutter core
Build Flutter clients as thin, typed consumers of an API — one Dart codebase per product, business state lives in providers, not widgets.
Dart 3 essentials
- sound null safety is the default — don't reach for
!without a documented invariant that makes it safe - records for lightweight multi-value returns (
(String, int)), not a throwaway class - pattern matching / switch expressions over
if/elsechains on a type - sealed classes for closed variant hierarchies (e.g.
Loading/Data/ErrorUI state) — the compiler flags a missing case in an exhaustiveswitch
State management — Riverpod is house default
- Riverpod is the house default for a new project. Check
pubspec.yaml, the lockfile, and the installed major's migration guide before choosing APIs; preserve an existing Bloc/Provider design. - widgets stay dumb: read a provider, render, dispatch an event. Business logic and mutable state live in providers/notifiers, not in
Stateobjects - no
BuildContextthreading to reach state — that dependency is what Riverpod removes