update method

  1. @override
V update (K key, V update(V value), { V ifAbsent() })
override

Updates the value for the provided key.

Returns the new value of the key.

If the key is present, invokes update with the current value and stores the new value in the map.

If the key is not present and ifAbsent is provided, calls ifAbsent and adds the key with the returned value to the map.

It's an error if the key is not present and ifAbsent is not provided.

Implementation

@override
// TODO: Dart 2.0 requires this method to be implemented.
// ignore: override_on_non_overriding_method
V update(K key, V update(V value), {V ifAbsent()}) {
  throw new UnimplementedError("update");
}