run method
Executes the effect immediately with the supplied handler. Each effect
implementation defines how it schedules work, emits values, and registers
disposables.
Implementation
@override
Future<void> run(EffectHandler<Value> handler) {
if (!handler.guard()) return Future.value();
Future<void> future = scheduler.delayed(interval, () {});
final cancellable = CancelableOperation.fromFuture(
future,
).then(
(_) => effect.run(handler),
);
handler.register(cancellable);
return cancellable.value;
}