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/WatchingStatefulWidgetor useWatchItMixin/WatchItStatefulWidgetMixin - Never in callbacks: Don't call watch functions inside builders, callbacks, or event handlers
watchValueselector MUST return aValueListenable<R>, not a bare valuecreateOnceworks 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