operator [] method

  1. @override
Future<T?> operator [](
  1. String key
)
override

Get the stash value for the specified key.

  • key: the key

Implementation

@override
Future<T?> operator [](String key) {
  return _primary[key]
      .then((value) => value != null ? Future.value(value) : _secondary[key]);
}