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.md
source 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
    final
    by default for variables
  • Use trailing commas for better formatting
  • Use
    const
    constructors where possible
  • Follow Dart effective style guide and linting rules (
    flutter_lints
    )

Widget Architecture

  • Keep widgets small and composable
  • Separate UI widgets from logic/state
  • Use
    StatelessWidget
    by default,
    StatefulWidget
    only when needed
  • Extract reusable widgets into separate files
  • Use
    const
    constructors for static widgets
  • Use
    Builder
    pattern for context-dependent widgets

State Management

  • Use Riverpod 2 as the primary state management solution
  • Use
    ref.watch()
    for reactive rebuilds,
    ref.read()
    for one-time reads
  • Use
    AsyncNotifierProvider
    for async state
  • Use
    StateProvider
    for simple state,
    NotifierProvider
    for complex
  • 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
    go_router
    for declarative navigation
  • Use
    freezed
    for immutable data classes with union types
  • Use
    dio
    for HTTP with interceptors
  • Use
    flutter_hooks
    for reusable stateful logic
  • Use
    AutoDispose
    providers to prevent memory leaks

Testing

  • Use
    flutter_test
    for widget tests
  • Use
    mocktail
    for mocking
  • Use golden tests for visual regression
  • Use
    integration_test
    for E2E
  • Test providers in isolation with
    ProviderContainer