ExtractWidgetOptions.fromJson constructor
ExtractWidgetOptions.fromJson(
- JsonDecoder jsonDecoder,
- String jsonPath,
- Object? json
)
Implementation
factory ExtractWidgetOptions.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json) {
json ??= {};
if (json is Map) {
String name;
if (json.containsKey('name')) {
name = jsonDecoder.decodeString('$jsonPath.name', json['name']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'name');
}
return ExtractWidgetOptions(name);
} else {
throw jsonDecoder.mismatch(jsonPath, 'extractWidget options', json);
}
}