BetterListNotifications<T> extension
Extension to provide additional methods for VN<List<T>>.
The BetterListNotifications extension enhances the functionality of VN<List<T>>
by adding convenience methods for common list operations, while respecting
the ChangeType configuration of the parent VN instance.
Features:
- Index-based element access and modification.
- List inspection properties (
isEmpty,isNotEmpty,length, etc.). - Methods for adding, removing, and clearing elements, with behavior determined by ChangeType.
- Functional utilities like
mapandwherefor list transformations.
Methods
-
hardAdd(
T value) → void -
Available on VN<
Adds the givenList< , provided by the BetterListNotifications extensionT> >valueto the list and notifies listeners. -
hardAddAll(
Iterable< T> value) → void -
Available on VN<
Appends all elements from the given iterableList< , provided by the BetterListNotifications extensionT> >valueto the list and notifies listeners. -
hardRemove(
Object? value) → bool -
Available on VN<
Removes the first occurrence of the givenList< , provided by the BetterListNotifications extensionT> >valuefrom the list and notifies listeners. -
hardRemoveAt(
int index) → T -
Available on VN<
Removes the element at the specifiedList< , provided by the BetterListNotifications extensionT> >indexfrom the list and notifies listeners. -
hardRemoveWhere(
bool where(T)) → void -
Available on VN<
Removes all elements that satisfy the given predicateList< , provided by the BetterListNotifications extensionT> >whereand notifies listeners. -
silentAdd(
T value) → void -
Available on VN<
Adds the givenList< , provided by the BetterListNotifications extensionT> >valueto the list without notifying listeners. -
silentAddAll(
Iterable< T> value) → void -
Available on VN<
Appends all elements from the given iterableList< , provided by the BetterListNotifications extensionT> >valueto the list without notifying listeners. -
silentRemove(
Object? value) → bool -
Available on VN<
Removes the first occurrence of the givenList< , provided by the BetterListNotifications extensionT> >valuefrom the list without notifying listeners. -
silentRemoveAt(
int index) → T -
Available on VN<
Removes the element at the specifiedList< , provided by the BetterListNotifications extensionT> >indexfrom the list without notifying listeners. -
silentRemoveWhere(
bool where(T)) → void -
Available on VN<
Removes all elements that satisfy the given predicateList< , provided by the BetterListNotifications extensionT> >wherewithout notifying listeners. -
smartAdd(
T value) → void -
Available on VN<
Adds the givenList< , provided by the BetterListNotifications extensionT> >valueto the list, with behavior determined by ChangeType. -
smartAddAll(
Iterable< T> value) → void -
Available on VN<
Appends all elements from the given iterableList< , provided by the BetterListNotifications extensionT> >valueto the list, with behavior determined by ChangeType. -
smartRemove(
Object? value) → bool -
Available on VN<
Removes the first occurrence of the givenList< , provided by the BetterListNotifications extensionT> >valuefrom the list, with behavior determined by ChangeType. -
smartRemoveAt(
int index) → T -
Available on VN<
Removes the element at the specifiedList< , provided by the BetterListNotifications extensionT> >indexfrom the list, with behavior determined by ChangeType. -
smartRemoveWhere(
bool where(T)) → void -
Available on VN<
Removes all elements that satisfy the given predicateList< , provided by the BetterListNotifications extensionT> >where, with behavior determined by ChangeType.
Operators
-
operator [](
int index) → T -
Available on VN<
Gets the element at the specifiedList< , provided by the BetterListNotifications extensionT> >indexin the list. -
operator []=(
int index, T value) → void -
Available on VN<
Sets the element at the specifiedList< , provided by the BetterListNotifications extensionT> >indexin the list to the givenvalue.