watch-it-expert

Installation
SKILL.md

watch_it Expert - Reactive Widget State Management

What: Reactive widgets that auto-rebuild when ValueListenables/Listenables, Streams, or Futures change. Built on get_it. Provides di global alias for GetIt.I.

CRITICAL RULES

  • ORDERING: All watch*(), registerHandler*(), createOnce(), callOnce() calls MUST execute in the same order on every build (like React Hooks)
  • Widget type: Must extend WatchingWidget / WatchingStatefulWidget or use WatchItMixin / WatchItStatefulWidgetMixin
  • Never in callbacks: Don't call watch functions inside builders, callbacks, or event handlers
  • watchValue selector MUST return a ValueListenable<R>, not a bare value
  • createOnce works in BOTH stateless and stateful widgets

Widget Types

ALWAYS prefer WatchingWidget / WatchingStatefulWidget for new code. Only use the mixin variants (WatchItMixin / WatchItStatefulWidgetMixin) when:

  • The widget needs additional mixins (e.g. TickerProviderStateMixin)
  • You're adding watch_it to existing code and don't want to change the base class
Installs
1
GitHub Stars
186
First Seen
3 days ago
watch-it-expert — flutter-it/watch_it