flutter-riverpod-state-management
БесплатноБез исполняемых скриптовНе проверенImplement reactive state management using Riverpod 3.x with code generation in Flutter. Use when defining providers, building AsyncNotifiers, or overriding…
от HoangNguyen0403★ 598 звёзд на GitHubОб этом скилле
Riverpod State Management
Priority: P0 (CRITICAL)
Targets Riverpod 3.x. Notifier/AsyncNotifier codegen surface is unchanged from 2.x; Riverpod 3 adds automatic retry with backoff and pause/resume for offline — do not hand-roll retry logic that the framework already provides.
Structure
lib/
├── providers/ # Global providers and services
└── features/user/
├── providers/ # Feature-specific providers
└── models/ # @freezed domain models
Provider Definition (Generator-First)
Use @riverpod annotations for all provider definitions. See implementation examples for full provider and consumer patterns.
Consuming Providers
Use ConsumerWidget with ref.watch() and AsyncValue.when() for reactive UI. See implementation examples.
Implementation Guidelines
- Generator First: Use
@riverpodannotations. Avoid manualProviderdefinitions. - Immutability: Use
Freezedfor all state models. - ref.watch(): Inside
build()to rebuild on changes. - ref.listen(): Inside
build()for side-effects (navigation, dialogs). Never in provider init. - ref.read(): ONLY in callbacks (
onPressed). - Testing: Override providers with
ProviderScope(overrides: [provider.overrideWithValue(Mock())]). - Linting: Enable
riverpod_lintandcustom_lintfor cycle detection.
Anti-Patterns
- No side-effects in provider init: Use
ref.listen()in widgets instead. - No BuildContext in Notifiers: Never pass
BuildContextinto Notifier/Provider. - No local provider instantiation: Keep providers global; avoid dynamic creation.
Related Topics
Установить flutter-riverpod-state-management в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл flutter-riverpod-state-management?
Implement reactive state management using Riverpod 3.x with code generation in Flutter. Use when defining providers, building AsyncNotifiers, or overriding providers in tests.
Как установить скилл flutter-riverpod-state-management?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл flutter-riverpod-state-management запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic