decodePlaygroundSettings function
- String text
Implementation
PlaygroundSettings decodePlaygroundSettings(String text) {
final json = jsonDecode(text);
if (json is! Map<String, Object?>) {
throw FormatException('saved playground settings are not an object: $text');
}
return PlaygroundSettings.fromJson(json);
}