getAndPut abstract method

Future<T?> getAndPut(
  1. String key,
  2. T value
)

Associates the specified value with the specified key in this stash, and returns any existing value. If the stash previously contained a mapping for the key, the old value is replaced by the specified value

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

The previous value is returned, or null if there was no value associated with the key previously.

Implementation

Future<T?> getAndPut(String key, T value);