@tank/flutter-dev
Installation
SKILL.md
Flutter Development
Core Philosophy
- Composition over inheritance — Build complex UIs by combining small, focused widgets. Extract widgets into separate classes instead of adding parameters to bloated ones.
- Immutable widget tree, mutable state tree — Widgets are throwaway configuration objects. The Element tree persists across frames and drives performance. Understand this distinction to avoid unnecessary rebuilds.
- Push state down, lift state up — Keep state as close to where it is consumed as possible. Lift only when siblings need to share it. Use Riverpod or BLoC for app-level state,
setStatefor ephemeral UI state. - Declarative navigation — Use GoRouter for URL-based, declarative routing. Imperative
Navigator.pushbreaks deep linking, web URLs, and state restoration. - Test the widget, not the framework — Write widget tests that verify behavior, not Flutter internals. Use golden tests for visual regression. Test state management in isolation with unit tests.