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> withPrefix =
      Map<String, Object>.from(_preferences);
  withPrefix.removeWhere((String key, _) => !(key.startsWith(filter.prefix) &&
      (filter.allowList?.contains(key) ?? true)));
  return withPrefix;
}