whereKeyStartsWith method

  1. @override
Map<String, dynamic> whereKeyStartsWith(
  1. String prefix
)

Implementation

@override
Map<String, dynamic> whereKeyStartsWith(String prefix) {
  final entries = _storage.entries
      .where((element) => element.key.startsWith(prefix))
      .fold(<String, dynamic>{},
          (acc, element) => {...acc, element.key: element.value});

  return entries;
}