observeStatus method
Observes this controller's animation status as a reactive Bloom of AnimationStatus.
Caution: VSYNC Coupling (Passive Observer)
observeStatus is a passive observer of this controller's timeline and does NOT generate physical VSYNC ticks on its own.
distinct: Whentrue(default), suppresses pulses if animated status does not change.graceful: Optional teardown deferral policy.
Ensures:
- Emits updated AnimationStatus values whenever the controller's animation status updates.
- Subscribes to status updates demand-driven while active, and automatically unsubscribes on deactivation to prevent listener memory leaks.
Warning (Anti-Pattern Prevention):
- Do NOT invoke observeStatus directly inside a widget
build()method; cache the returned Bloom in state or a store.
Examples
final statusBloom = controller.observeStatus();
final label = statusBloom.build((context, status) => Text(status.name));
Implementation
Bloom<AnimationStatus> observeStatus({
bool distinct = true,
Graceful? graceful,
}) =>
_view.toStatusBloom(
distinct: distinct,
graceful: graceful,
);