evanca/flutter-ai-rules/provider
Claude Code and agent skill by evanca/flutter-ai-rules
- community
Checking that the SKILL.md file is still in the repository.
Use when setting up providers, consuming state, optimizing rebuilds, using ProxyProvider, or migrating from deprecated providers (Provider package).
Install
npx vskill@latest install evanca/flutter-ai-rules/providerSKILL.md
Provider Skill
This skill defines how to correctly use the provider package in Flutter applications.
1. Provider Types
| Provider | Use for | |
|---|---|---|
Provider | Exposing any immutable value | |
ChangeNotifierProvider | Mutable state with ChangeNotifier | |
FutureProvider | Exposing a Future result | |
StreamProvider | Exposing a Stream | |
ProxyProvider / ChangeNotifierProxyProvider | Objects that depend on other providers |
2. Setup
- Use
MultiProviderto group multiple providers and avoid deeply nested trees. ChangeNotifierProviderautomatically disposes the model when it is no longer needed.- Never create a provider's object from variables that can change over time — the object won't update when the variable changes. Use
ProxyProviderinstead. - If you have 150+ providers, consider mounting them over time (e.g., during a splash screen) rather than all at once to avoid
StackOverflowError.
3. Consuming State
Always specify the generic type for type safety:
Use Consumer<T> or Selector<T, R> widgets when you need fine-grained rebuilds and cannot access a descendant BuildContext:
4. ProxyProvider
Use ProxyProvider or ChangeNotifierProxyProvider for objects that depend on other providers or values that can change:
5. Rules
- Do not access providers inside
initStateor constructors — use them inbuild, callbacks, or lifecycle methods where the widget is fully mounted. - You can use any object as state, not just
ChangeNotifier; useProvider.value()with aStatefulWidgetif needed.
6. Debugging
Implement toString or DiagnosticableTreeMixin to improve how your objects appear in Flutter DevTools:
7. Migration: ValueListenableProvider
ValueListenableProvider is deprecated. Use Provider with ValueListenableBuilder instead:
References
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/provider/SKILL.md
Popularity
- Repository stars
- 513
- Repository forks
- 51
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 1 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/evanca/flutter-ai-rules/provider)