fromFuture<Msg, S> static method

SubItem<Msg> fromFuture<Msg, S>(
  1. SubscriptionId id,
  2. Future<S> future,
  3. Msg? futureObjectToMsg(
    1. S
    )
)

Creates a subscription from a future, transforming the future object to a message.

Implementation

static SubItem<Msg> fromFuture<Msg, S>(SubscriptionId id, Future<S> future,
        Msg? Function(S) futureObjectToMsg) =>
    fromStream(id, future.asStream(), futureObjectToMsg);