loadUnlockFeatures method
Implementation
Map<String, bool> loadUnlockFeatures() {
try {
final jsonStr = storage.getString(keyUnlockFeatures);
if (jsonStr != null) {
final decoded = jsonDecode(jsonStr) as Map<String, dynamic>;
return decoded.map((key, value) => MapEntry(key, value as bool));
}
} catch (_) {}
// Backward compatibility for old boolean value
final legacyBool = storage.getBool(keyUnlockFeatures);
if (legacyBool != null) {
return {'all': legacyBool};
}
return {};
}