computeIfAbsentAsync method

Future<V> computeIfAbsentAsync(
  1. K key,
  2. Future<V> ifAbsent(
    1. K key
    )
)

Implementation

Future<V> computeIfAbsentAsync(
    K key, Future<V> Function(K key) ifAbsent) async {
  if (!containsKey(key)) {
    this[key] = await ifAbsent(key);
  }
  return this[key]!;
}