# ListChange<T>.clear constructor

const ListChange<T>.clear()

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.clear()
        : type = ListChangeType.clear,
          index = null,
          oldValue = null,
          newValue = null;