MapChange<K, V>.remove constructor

const MapChange<K, V>.remove(
  1. K? key,
  2. V? oldValue
)

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.remove(this.key, this.oldValue)
    : type = MapChangeType.remove,
      newValue = null;