getPropertiesForPrefix method

  1. @override
PropertyDict getPropertiesForPrefix(
  1. String prefix
)
override

Get all properties whose keys begins with prefix. If prefix is an empty string, then all properties are returned. @param prefix The prefix to search for (empty string if none). @return The matching property set.

Implementation

@override
PropertyDict getPropertiesForPrefix(String prefix) {
  final result = PropertyDict();
  _properties.forEach((key, value) {
    if (key.startsWith(prefix)) {
      result[key] = value.value;
      value.used = true;
    }
  });
  return result;
}