readAll method

  1. @nonVirtual
  2. @override
Future<Map<Key, Object?>> readAll([
  1. Options? options
])
override

Returns all keys in the persistent storage.

Implementation

@nonVirtual
@override
Future<Map<Key, Object?>> readAll([Options? options]) {
  assert(_debugAssertNotDisposed());

  return useStorageWithHandlers(
    (s) => s.readAll(options),
    (value, _) {
      if (_isLogEnabled) {
        _publishLog(
            ReadAllSuccessEvent(value.toListOfKeyAndValues(), options));
      }
    },
    (error, _) {
      if (_isLogEnabled) {
        _publishLog(ReadAllFailureEvent(error, options));
      }
    },
  );
}