putIfAbsent abstract method

Future<bool> putIfAbsent(
  1. String key,
  2. T value
)

Associates the specified key with the given value if not already associated with one.

  • key: key with which the specified value is to be associated
  • value: value to be associated with the specified key

Returns true if a value was set.

Implementation

Future<bool> putIfAbsent(String key, T value);