computeAsync method

Future<V> computeAsync(
  1. K key,
  2. Future<V> compute(
    1. K key,
    2. V? value
    )
)

Implementation

Future<V> computeAsync(
    K key, Future<V> Function(K key, V? value) compute) async {
  this[key] = await compute(key, this[key]);
  return this[key]!;
}