Of<T> class

This is a basic implementation of an Observable. This offers a lite observable. An Observer will subscribe to an Observable. Then that observer reacts to whatever item the Observable emits.

Constructors

Of(T _value)
Build an observable from a value
Of.tag(T value, [dynamic tag = #base])
Create an observable from value and tag. then persist to cache.
factory
Of.type()
Build an Observable from a type.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag ↔ dynamic
The observable tag reference.
getter/setter pair
value ↔ T
Getter of the current value of this observable.
getter/setter pair

Methods

alert(ObservableListener<T> alerter) → void
alert() Add an ephemeral listener to this observable. this listener will be unsubscribe after the next change.
listen(ObservableListener<T> listener) → void
listen() Adds a permanent listener to this observable.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refresh() → void
Manually refresh this observale.
toString() String
A string representation of this object.
override
unListen(ObservableListener<T> listener) → void
unListen() Removes a permanent listener from this observable.

Operators

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

Static Methods

free<E>(Of<E> obs) → void
Free observable from cache.
withTag<T>(dynamic tag) → dynamic
Get persisted observable by tag.