protected static method
Implementation
static Future<TSharedProtectedJsonPod> protected(
String key, {
Map<String, dynamic>? initialValue,
}) async {
final instance = TSharedProtectedJsonPod(
key,
fromValue: (value) =>
value != null ? jsonDecode(value) as Map<String, dynamic> : null,
toValue: (rawValue) => jsonEncode(rawValue),
initialValue: initialValue,
);
await instance.refresh();
return instance;
}