RxList<T> class
A specialized Rx for List values with additional convenience methods.
Properties
- firstOrNull → T?
-
Returns the first item in the list, or null if empty.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Returns true if the list is empty.
no setter
- isNotEmpty → bool
-
Returns true if the list is not empty.
no setter
- lastOrNull → T?
-
Returns the last item in the list, or null if empty.
no setter
- length → int
-
Returns the length of the list.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
List< T> > -
Gets a stream of value changes.
no setterinherited
-
value
↔ List<
T> -
Gets the current value.
getter/setter pairinherited
Methods
-
add(
T item) → void - Adds an item to the list.
-
addAll(
Iterable< T> items) → void - Adds all items to the list.
-
clear(
) → void - Clears all items from the list.
-
clearListeners(
) → void -
Removes all listeners.
inherited
-
dispose(
) → void -
Disposes of the reactive value and closes the stream.
inherited
-
listen(
void callback(List< T> )) → VoidCallback -
Adds a listener that will be called whenever the value changes.
inherited
-
listenWithPrevious(
void callback(List< T> previous, List<T> current)) → VoidCallback -
Adds a listener that will be called with both the previous and the new
value on every change.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
T item) → void - Removes an item from the list.
-
removeAt(
int index) → void - Removes an item at the specified index.
-
removeListener(
void callback(List< T> )) → void -
Removes a specific listener.
inherited
-
toString(
) → String -
Returns the current value as a string.
inherited
-
update(
List< T> updater(List<T> current)) → void -
Updates the value using a function and notifies listeners if changed.
inherited
Operators
-
operator ==(
Object other) → bool -
Checks equality based on the current value.
inherited