LoadingControl class

Extended FieldControl specified to control LoadingStatus.

Inheritance
Available Extensions

Constructors

LoadingControl([LoadingStatus status = LoadingStatus.initial])
FieldControl of LoadingStatus.

Properties

hasError bool
Returns true if value is LoadingStatus.error.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasMessage bool
Returns true if message is not null.
no setter
inProgress bool
Returns true if value is LoadingStatus.progress.
no setter
internalData ↔ dynamic
getter/setter pairinherited
isActive bool
Checks if Stream is not closed.
no setterinherited
isClosed bool
Returns true if current stream is closed.
no setterinherited
isDone bool
Returns true if value is LoadingStatus.done.
no setter
isEmpty bool
no setterinherited
isNotEmpty bool
no setterinherited
isValid bool
no setterinherited
message ↔ dynamic
Inner message of LoadingStatus. Can be used to hold error or any other loading message.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sink Sink<LoadingStatus>
Default sink of this controller. Use sinkConverter to convert input data.
no setterinherited
stream Stream<LoadingStatus?>
no setterinherited
value LoadingStatus?
getter/setter pairinherited

Methods

cancel(ControlSubscription<LoadingStatus?> subscription) → void
inherited
cast<U>() ObservableValue<U>
inherited
dispose() → void
Used to clear and dispose object. After this method call is object typically unusable and ready for GC. Can be called multiple times!
inherited
done({dynamic msg}) → void
Changes status to LoadingStatus.done and sets inner message.
error({dynamic msg}) → void
Changes status to LoadingStatus.error and sets inner message.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → void
Notifies current Stream.
inherited
onFuture(Future future, {ValueConverter? converter}) Future
Sets value after future finishes. Via ValueConverter is possible to convert object from input Stream type to own stream value. Returns Future to await and register other callbacks.
inherited
outdated({dynamic msg}) → void
Changes status to LoadingStatus.outdated and sets inner message.
progress({dynamic msg}) → void
Changes status to LoadingStatus.progress and sets inner message.
setStatus(LoadingStatus status, {dynamic msg}) → void
Changes status and sets inner message.
setValue(LoadingStatus? value, {bool notify = true, bool forceNotify = false}) → void
inherited
sinkConverter(ValueConverter<LoadingStatus> converter) Sink
Returns Sink with custom ValueConverter.
inherited
softDispose() → void
Clears subscribers, but didn't close Stream entirely.
inherited
subscribe(ValueCallback<LoadingStatus?> action, {bool current = true, dynamic args}) FieldSubscription<LoadingStatus>
inherited
subscribeStream(void onData(LoadingStatus? event), {Function? onError, void onDone()?, bool cancelOnError = false, bool current = true}) FieldSubscription<LoadingStatus>
inherited
subscribeTo(Stream stream, {Function? onError, void onDone()?, bool cancelOnError = false, ValueConverter? converter}) FieldSubscription
Subscribes this field to given Stream. Controller will subscribe to input stream and will listen for changes and populate this changes into own stream. Via ValueConverter is possible to convert object from input Stream type to own stream value. StreamSubscription is automatically closed during dispose phase of FieldControl. Returns FieldSubscription for manual cancellation.
inherited
toString() String
A string representation of this object.
inherited
unknown({dynamic msg}) → void
Changes status to LoadingStatus.unknown and sets inner message.

Operators

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