watch method
Emits a snapshot on every new subscription, then subsequent transitions.
Implementation
Stream<LikeStateResponse<T>> watch() => Stream.multi((controller) {
controller.add(_state);
final subscription = _events.stream.listen(
controller.add,
onError: controller.addError,
onDone: controller.close,
);
controller.onCancel = subscription.cancel;
});