Sub<Model, Msg> class

Constructors

Sub(Subs<Model, Msg> subs)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

batch<Model, Msg>(List<Sub<Model, Msg>> subs) Sub<Model, Msg>
Concat a list of subscriptions into a single one.
fromFuture<Model, Msg, S>(SubscriptionId id, Future<S> future, Msg? futureObjectToMsg(S)) SubItem<Model, Msg>
Creates a subscription from a future, transforming the future object to a message.
fromMsgStream<Model, Msg>(SubscriptionId id, Stream<Msg?> stream) SubItem<Model, Msg>
Creates a subscription from a stream, using the stream objects as messages.
fromStream<Model, Msg, S>(SubscriptionId id, Stream<S> stream, Msg? streamObjectToMsg(S)) SubItem<Model, Msg>
Creates a subscription from a stream, transforming the stream objects to messages.
map<Model, Inner, Msg>(String idPrefix, Sub<Model, Inner> sub, Msg f(Inner)) Sub<Model, Msg>
Map a subscription from one message type to another, keeping the same model.
mapWithModel<ParentModel, ChildModel, ChildMsg, ParentMsg>(String idPrefix, Sub<ChildModel, ChildMsg> sub, ParentMsg msgMapper(ChildMsg), ChildModel modelMapper(ParentModel)) Sub<ParentModel, ParentMsg>
Map a subscription from a child model/message pair to a parent model/message pair.
none<Model, Msg>() Sub<Model, Msg>
Empty subscription.