Watch It는 Flutter용 가벼운 상태 관리 솔루션으로, 등록된 객체의 변경 사항을 감지하고 이러한 변경이 발생할 때 자동으로 UI를 다시 렌더링하는 get_it 서비스 로케이터를 활용합니다. get_it와 원활하게 통합되어 복잡한 보일러플레이트나 추가 위젯 없이도 상태 업데이트를 간소화합니다. 서비스 객체와 연결된 반응형 동작이 필요한 앱에 적합하며, 수동 상태 처리를 줄여 깔끔하고 유지보수 쉬운 코드를 촉진합니다. 모든 주요 Flutter 플랫폼을 지원하며, 이미 get_it를 사용 중인 프로젝트에서도 잘 작동합니다.
The easiest state management for Flutter built on get_it
Widgets automatically rebuild when data changes. No ValueListenableBuilder, no StreamBuilder, no FutureBuilder—just watch your data and your UI stays in sync.
One line instead of 12. No nesting, no boilerplate. Watch multiple values without builder hell.
Part of flutter_it — A construction set of independent packages. watch_it + get_it is the recommended foundation. Add command_it and listen_it when you need them.
Why watch_it?
✨ Zero Boilerplate — No Builders, no setState, no widget tree nesting
⚡ Automatic Cleanup — Subscriptions disposed automatically when widget destroys
🎯 Type Safe — Catch errors at compile time with generics
🔧 Flexible Data Types — Works with Listenable, ValueListenable, Stream, Future
📊 Multiple Watches — Watch 3+ values without pyramid of doom
🧪 Test Friendly — Easy to mock and inject dependencies
Watching objects created by cached factories with parameters
If you have one manager per entity (e.g. per station id), register it with registerCachedFactoryParam and pass the parameter to the watch function. When the parameter changes, watch_it automatically unsubscribes from the old instance and subscribes to the new one:
di.registerCachedFactoryParam<StationManager, String, void>(
(stationId, _) => StationManager(stationId),
);
classStationTileextendsWatchingWidget{
finalString stationId;
constStationTile({super.key, requiredthis.stationId});
@overrideWidgetbuild(BuildContext context) {
final name = watchValue((StationManager m) => m.name, param1: stationId);
returnText(name);
}
}
param1/param2 are available on all watch and handler functions that resolve their object from get_it. They are only valid for types registered with registerCachedFactoryParam. Plain registerFactory registrations can't be watched at all (every build would get a new instance) and are rejected in debug mode.
Lifecycle Helpers
Powerful functions for StatelessWidgets:
createOnce — Create objects on first build, auto-dispose on widget destroy
Built on get_it — watch_it is designed to work with get_it's service locator pattern. Register your models, services, and business logic with get_it, then watch them reactively.
// Register with get_it
di.registerLazySingleton(() => UserManager());
di.registerLazySingleton(() => TodoManager());
// Watch them in any widgetclassMyWidgetextendsWatchingWidget{
@overrideWidgetbuild(BuildContext context) {
final user = watchIt<UserManager>();
final todos = watchValue((TodoManager m) => m.todos);
returnListView(...);
}
}
Want more? Combine with other flutter_it packages:
get_it — Recommended pairing. Service locator for dependency injection. Access global services with di<T>().
Optional: command_it — Command pattern with loading/error states. Watch Commands reactively for automatic UI updates.
💡 flutter_it is a construction set — watch_it + get_it is the recommended foundation. Add command_it and listen_it when you need advanced features. Each package works independently.
This package ships an Agent Skill for AI coding assistants
(Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI and others) in skills/watch-it-expert/.
It teaches them the critical rules, common patterns and anti-patterns of watch_it.
Install it into your project with the official Dart skills tool:
dart run skills@ get
dart run skills@ get only looks at direct dependencies. If you use get_it through watch_it, add get_it to your pubspec as well to also get get-it-expert.
For the ecosystem-wide skills (architecture guidance, feed/data-source patterns, overview)
and the skills of the other flutter_it packages run: