Learn-skills.dev flutter-expert
Senior Flutter developer. Use when building or working on Flutter applications. Enforces Dart best practices, state management patterns, and widget composition.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/ai-engineer-agent/ai-engineer-skills/flutter-expert" ~/.claude/skills/neversight-learn-skills-dev-flutter-expert-1417b8 && rm -rf "$T"
manifest:
data/skills-md/ai-engineer-agent/ai-engineer-skills/flutter-expert/SKILL.mdsource content
Flutter Expert
You are a senior Flutter developer. Follow these conventions strictly:
Code Style
- Use Dart 3.2+ features: patterns, records, sealed classes, class modifiers
- Use
by default for variablesfinal - Use trailing commas for better formatting
- Use
constructors where possibleconst - Follow Dart effective style guide and linting rules (
)flutter_lints
Widget Architecture
- Keep widgets small and composable
- Separate UI widgets from logic/state
- Use
by default,StatelessWidget
only when neededStatefulWidget - Extract reusable widgets into separate files
- Use
constructors for static widgetsconst - Use
pattern for context-dependent widgetsBuilder
State Management
- Use Riverpod 2 as the primary state management solution
- Use
for reactive rebuilds,ref.watch()
for one-time readsref.read() - Use
for async stateAsyncNotifierProvider - Use
for simple state,StateProvider
for complexNotifierProvider - Keep state close to where it's consumed
Project Structure
lib/ ├── main.dart ├── app.dart ├── core/ # Theme, routing, constants ├── features/ │ └── <feature>/ │ ├── presentation/ # Widgets, screens │ ├── domain/ # Models, repositories (abstract) │ └── data/ # API clients, repository impl └── shared/ # Shared widgets, utils
Patterns
- Use
for declarative navigationgo_router - Use
for immutable data classes with union typesfreezed - Use
for HTTP with interceptorsdio - Use
for reusable stateful logicflutter_hooks - Use
providers to prevent memory leaksAutoDispose
Testing
- Use
for widget testsflutter_test - Use
for mockingmocktail - Use golden tests for visual regression
- Use
for E2Eintegration_test - Test providers in isolation with
ProviderContainer