UiResourceStore<T, TId> class
A list-shaped store for feature resources such as sessions, invoices, notifications, or any other UI collection with stable ids.
- Inheritance
-
- Object
- ChangeNotifier
- UiStore<
List< T> > - UiResourceStore
Constructors
-
UiResourceStore({required UiItemId<
T, TId> getId, Iterable<T> initialItems = const []})
Properties
-
getId
→ UiItemId<
T, TId> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
items
→ List<
T> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ List<
T> -
no setterinherited
-
value
→ List<
T> -
The current value of the object.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
byId(
TId id) → T? -
containsId(
TId id) → bool -
dispose(
) → void -
Discards any resources used by the object.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeById(
TId id) → void -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removeWhere(
UiItemPredicate< T> test) → void -
replaceAll(
Iterable< T> items) → void -
select<
TSlice> (UiStateSelector< List< selector) → TSliceT> , TSlice> -
inherited
-
setState(
List< T> nextState) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
UiStateUpdater< List< updater) → voidT> > -
inherited
-
updateById(
TId id, UiItemUpdater< T> update) → void -
updateWhere(
UiItemPredicate< T> test, UiItemUpdater<T> update) → void -
upsert(
T item, {bool append = true}) → void -
upsertAll(
Iterable< T> items, {bool append = true}) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited