MapChange<K, V>.put constructor
const
MapChange<K, V>.put (
- K? key,
- V? oldValue,
- V? newValue
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.put(this.key, this.oldValue, this.newValue)
: type = MapChangeType.put;