Set<String> getKeys() { return preferences?.getKeys() .where((key) => key.startsWith('${type.name}.')) .map((key) => key.substring(type.name.length + 1)) .toSet() ?? {}; }