Agent skill

flutter-change-notifier

Use when setting up ChangeNotifier models, providing them to the widget tree, consuming state with Consumer or Provider.of, or optimizing rebuilds.

evancagithub.com/evancaGitHub ↗
claude-codecodexcursorwindsurfMIT
Install
npx skills add evanca/flutter-ai-rules --skill flutter-change-notifier --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 3 KB
Bundled scripts: none
Path: skills/flutter-change-notifier/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 604
Language: Shell

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Flutter ChangeNotifier Skill This skill defines how to correctly use `ChangeNotifier` with the `provider` package for state management in Flutter. --- ## 1. Model Extend `ChangeNotifier` to manage state. Keep internal state **private** and expose **unmodifiable views**. Call `notifyListeners()` on every state change. ```dart class CartModel extends ChangeNotifier { final List<Item> _items = []; UnmodifiableListView<Item> get items => UnmodifiableListView(_items); void add(Item item) { _items.add(item); notifyListeners(); } void removeAll() { _items.clear(); notifyListeners(); } } ``` - Place shared state **above** the widgets that use it in the widget tree. - Never directly mutate widgets or call methods on them to change state — rebuild widgets with new data instead. --- ## 2. Providing the Model ```dart ChangeNotifierProvider( create: (context) => CartModel(), child: MyApp(), ) ``` - `ChangeNotifierProvider` **automatically disposes** of the model when it is no longer needed. - Use `MultiProvider` when you need to provide multiple models: ```dart MultiProvider( providers: [ ChangeNotifierProvider(create: (_) => CartModel()), ChangeNotifierProvider(create: (_) => UserModel()), ]

What's inside
Steps it walks through
  1. 1. Model
  2. 2. Providing the Model
  3. 3. Consuming State
  4. Consumer
  5. Provider.of with listen: false
  6. 4. Optimization Rules
  7. 5. Testing
  8. References
More from flutter-ai-rules
All skills →
About this skill
What does the flutter-change-notifier skill do?

Use when setting up ChangeNotifier models, providing them to the widget tree, consuming state with Consumer or Provider.of, or optimizing rebuilds.

How do I install it?

Run `npx skills add evanca/flutter-ai-rules --skill flutter-change-notifier --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From evanca/flutter-ai-rules, a repository with 604 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going