put method

  1. @override
Future<bool> put(
  1. K key,
  2. V value
)
override

Stores a value with the given key.

Returns true if the operation was successful, false otherwise.

Implementation

@override
Future<bool> put(K key, V value) async {
  try {
    _storage[key] = value;
    return true;
  } catch (e) {
    return false;
  }
}