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 map and where for list transformations.
on

Methods

hardAdd(T value) → void

Available on VN<List<T>>, provided by the BetterListNotifications extension

Adds the given value to the list and notifies listeners.
hardAddAll(Iterable<T> value) → void

Available on VN<List<T>>, provided by the BetterListNotifications extension

Appends all elements from the given iterable value to the list and notifies listeners.
hardRemove(Object? value) bool

Available on VN<List<T>>, provided by the BetterListNotifications extension

Removes the first occurrence of the given value from the list and notifies listeners.
hardRemoveAt(int index) → T

Available on VN<List<T>>, provided by the BetterListNotifications extension

Removes the element at the specified index from the list and notifies listeners.
hardRemoveWhere(bool where(T)) → void

Available on VN<List<T>>, provided by the BetterListNotifications extension

Removes all elements that satisfy the given predicate where and notifies listeners.
silentAdd(T value) → void

Available on VN<List<T>>, provided by the BetterListNotifications extension

Adds the given value to the list without notifying listeners.
silentAddAll(Iterable<T> value) → void

Available on VN<List<T>>, provided by the BetterListNotifications extension

Appends all elements from the given iterable value to the list without notifying listeners.
silentRemove(Object? value) bool

Available on VN<List<T>>, provided by the BetterListNotifications extension

Removes the first occurrence of the given value from the list without notifying listeners.
silentRemoveAt(int index) → T

Available on VN<List<T>>, provided by the BetterListNotifications extension

Removes the element at the specified index from the list without notifying listeners.
silentRemoveWhere(bool where(T)) → void

Available on VN<List<T>>, provided by the BetterListNotifications extension

Removes all elements that satisfy the given predicate where without notifying listeners.
smartAdd(T value) → void

Available on VN<List<T>>, provided by the BetterListNotifications extension

Adds the given value to the list, with behavior determined by ChangeType.
smartAddAll(Iterable<T> value) → void

Available on VN<List<T>>, provided by the BetterListNotifications extension

Appends all elements from the given iterable value to the list, with behavior determined by ChangeType.
smartRemove(Object? value) bool

Available on VN<List<T>>, provided by the BetterListNotifications extension

Removes the first occurrence of the given value from the list, with behavior determined by ChangeType.
smartRemoveAt(int index) → T

Available on VN<List<T>>, provided by the BetterListNotifications extension

Removes the element at the specified index from the list, with behavior determined by ChangeType.
smartRemoveWhere(bool where(T)) → void

Available on VN<List<T>>, provided by the BetterListNotifications extension

Removes all elements that satisfy the given predicate where, with behavior determined by ChangeType.

Operators

operator [](int index) → T

Available on VN<List<T>>, provided by the BetterListNotifications extension

Gets the element at the specified index in the list.
operator []=(int index, T value) → void

Available on VN<List<T>>, provided by the BetterListNotifications extension

Sets the element at the specified index in the list to the given value.