asyncVal<Msg> static method
Pseudo constructor to map directly a Msg
value to an AsyncValue<Msg>
Implementation
static StreamValuable<ValuableAsyncValue<Msg>, Msg> asyncVal<Msg>(
Valuable<Stream<Msg>> stream) {
return StreamValuable(
stream,
dataValue: (_, data) => ValuableAsyncValue.data(data),
errorValue: (_, error, stackTrace) =>
ValuableAsyncValue.error(error, stackTrace),
doneValue: (_) => ValuableAsyncValue.noData(closed: true),
initialData: ValuableAsyncValue.noData(),
evaluateWithContext: false,
);
}