ListChange<T>.remove constructor
const
ListChange<T>.remove (
- int? index,
- T? oldValue
Represents a change in a List
.
This event captures details about what kind of modification occurred in the list (add, insert, remove, update, clear), the index affected, and the values before and after the change.
Example
void main() {
var addEvent = ListChange.add(0, 'apple');
print(addEvent.type); // ListChangeType.add
var removeEvent = ListChange.remove(1, 'banana');
print(removeEvent.oldValue); // banana
}
Implementation
const ListChange.remove(this.index, this.oldValue)
: type = ListChangeType.remove,
newValue = null;