dart_scope library

Classes

Async<T>
Async<T> represent data in its asynchronous form.
AsyncFinal<T>
AsyncFinal is configuration simulate asynchronous assignment using final keyword.
Computed<T, R>
Computed2<T1, T2, R>
Computed3<T1, T2, T3, R>
Computed4<T1, T2, T3, T4, R>
Computed5<T1, T2, T3, T4, T5, R>
Computed6<T1, T2, T3, T4, T5, T6, R>
Computed7<T1, T2, T3, T4, T5, T6, T7, R>
Computed8<T1, T2, T3, T4, T5, T6, T7, T8, R>
Computed9<T1, T2, T3, T4, T5, T6, T7, T8, T9, R>
Configurable
Configurable is configuration for scope.
ConfigurableCombine
Combine multiple Configurables into one Configurable.
ConfigurableScope
ConfigurableScope is a draft of scope that can be configured with scope.expose and scope.addDispose methods, it is often used during scope creation.
Disposable
DisposableSink
DisposableSink is an interface that expose disposableSink.addDisposable and disposableSink.addDisposables methods.
Final<T>
Final is configuration simulate assignment using (late) final keyword.
FinalStates<T>
FinalStatesConvertible<T, E>
FutureOr<T>
A type representing values that are either Future<T> or T.
HasStates<T>
InstanceAsObservable<T, R>
InstanceAsObservable provide an unified way to turn an instance to an observable.
MultiSourcePipeObservable<T, R>
MultiSourcePipeObservable is a pipeline that transform multiple input observables to an output observable.
Observable<T>
Observable is a sequence of data that can be emitted synchronously or asynchronously.
Observation<O extends Observable<T>, T>
Observation is the observe action that an observer observes an observable.
Observer<T>
Observer is someone who observe something.
PipeObservable<T, R>
PipeObservable is a pipeline that transform an input observable to an output observable.
Publisher<T>
Publisher emits to an observer only those items that are emitted by the source Observable(s) subsequent to the time of the subscription.
Replayer<T>
Replayer first replays items to an observer that are emitted by the source Observable(s) and then forward upcoming items to this observer.
Scope
Scope is the range that something within it can be accessed.
ScopeExpose
ScopeExpose is an interface that expose scope.expose method.
ScopeGet
ScopeGet is an interface that expose scope.getOrNull and scope.has methods.
ScopePush
ScopePush is an interface that expose a scope.push method.
States<T>
States is a sequence of state.
StatesActivated<T>
Subject<T>
A Subject is a sort of bridge or proxy that acts both as an observer and as an Observable. Because it is an observer, it can subscribe to one or more Observables, and because it is an Observable, it can pass through the items it observes by reemitting them, and it can also emit new items.
Variable<T>
Variable hold value that can be changed. Value could be resolved once or continuously.

Enums

AsyncStatus
AsyncStatus represent the status of asynchronous data.

Extensions

DisposableSinkX on DisposableSink
DisposableSinkX is an extension to DisposableSink that adds a disposableSink.addDispose method.
DisposableX on Disposable
ObservableAsStatesX on Observable<T>
An extension adds method observable.asStates
ObservableX on Observable<T>
ObservableX is an extension on Observable that adds common used operators like map, where, etc.
ScopeGetStatesX on ScopeGet
ScopeGetStatesX is an extension to ScopeGet that adds convenience methods like scope.getStates, scope.getStatesOrNull and scope.hasStates.
ScopeGetX on ScopeGet
ScopeGetX is an extension to ScopeGet that adds scope.get method.
StatesX on States<T>
StatesX is an extension on States that adds common used operators like map, cast, etc.

Functions

defaultEquals<T>(T it1, T it2) bool
default implementation of Equals function

Typedefs

ConfigureScope = FutureOr<void> Function(ConfigurableScope scope)
ConfigureScope is a function describe how to configure scope.
DisposeValue<T> = void Function(T)
DisposeValue is a function describe how to dispose a value.
Equal<T> = T Function(ScopeGet scope)
Equal is a function describe how to resolve a value, this value can be assigned then.
Equals<T> = bool Function(T it1, T it2)
Describe the equality of two item
ExposeStatesConvertible<T, E> = void Function(ScopeExpose scope, Getter<T> getValue, Getter<States<E>> getStates)
ExposeValue<T> = void Function(ScopeExpose scope, Getter<T> getValue)
ExposeValue is a function describe how to expose a value.
Getter<T> = T Function()
typedef for getter
Observe<T> = Disposable Function(OnData<T> onData)
Observe is a function describe how to emit data.
OnData<T> = void Function(T data)
OnData is a function describe how to handle data.
VoidCallback = void Function()
typedef for void callback

Exceptions / Errors

LatestStateNotReplayError<T>
An error indicate States not replay latest value synchronously to observer when observed, while states promising this behavior.
ScopeValueNotExposedError<T>
ScopeValueNotExposedError is an error indicates the resolving value has not been exposed in current scope.