withValueNotifier<L, R> function
FutureOr<Either<L, R> >
withValueNotifier<L, R>(
- ValueNotifier<
TaskEitherValue< notifier,L, R> > - TaskEither<
L, R> task
Implementation
FutureOr<Either<L, R>> withValueNotifier<L, R>(
ValueNotifier<TaskEitherValue<L, R>> notifier,
TaskEither<L, R> task,
) {
notifier.value = asLoading(notifier.value);
return task().flatMap((a) {
notifier.value = fromEither(a);
return a;
});
}