# MapChange<K, V>.clear constructor

const MapChange<K, V>.clear([

1. K? key

])

Represents a change in a `Map`.

This event captures information about changes to key-value pairs, including additions, updates, removals, and clear operations.

### Example

    void main() {
      var putEvent = MapChange.put('Alice', 10, 20);
      print(putEvent.type); // MapChangeType.put

      var removeEvent = MapChange.remove('Bob', 15);
      print(removeEvent.oldValue); // 15
    }

## Implementation

    const MapChange.clear([this.key])
        : type = MapChangeType.clear,
          oldValue = null,
          newValue = null;