getAllWithParameters method

  1. @override
Future<Map<String, Object>> getAllWithParameters(
  1. GetAllParameters parameters
)
override

Returns all key/value pairs persisting in this store that match options.

Implementation

@override
Future<Map<String, Object>> getAllWithParameters(
    GetAllParameters parameters) async {
  final PreferencesFilter filter = parameters.filter;
  final Map<String, Object> preferences = Map<String, Object>.from(_data);
  preferences.removeWhere((String key, _) =>
      !key.startsWith(filter.prefix) ||
      (filter.allowList != null && !filter.allowList!.contains(key)));
  return preferences;
}