update method Null safety

  1. @override
V update(
  1. K key,
  2. V update(
    1. V
    ),
  3. {V ifAbsent(
      )?}
    )
    override

    Updates the value for the provided key.

    Returns the new value associated with 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.

    If the key is not present, ifAbsent must be provided.

    Implementation

    @override
    V update(K key, V Function(V) update, {V Function()? ifAbsent}) =>
        _base.update(key, update, ifAbsent: ifAbsent);