store library

Classes

CurrentSource<T>
Readable<T>
Readable store.
Writeable<T>
Writeable store.

Mixins

StoreSource<T>

Functions

get<T>(Readable<T> store) → T
Returns the current value of the store.
readable<T>(T value, [StartStopNotifier<T>? start]) Readable<T>
Creates a store whose value cannot be set from 'outside', the first argument is the store's initial value, and the second argument to readable is the same as the second argument to writable.
readonly<T>(Readable<T> store) Readable<T>
This simple helper function makes a store readonly. You can still subscribe to the changes from the original one using this new readable store.
writeable<T>(T value, [StartStopNotifier<T>? start]) Writeable<T>
Function that creates a store which has values that can be set from 'outside' components. It gets created as an record with additional set and update methods.

Typedefs

StartStopNotifier<T> = Unsubscriber? Function(({Subscriber<T> set, void Function(Updater<T> updater) update}))
Store notifier.
Subscriber<T> = void Function(T value)
Store subscriber.
Unsubscriber = void Function()
Store ubsubscriber.
Updater<T> = T Function(T value)
Store uodater.