FlutterGetWidgetDescriptionResult.fromJson constructor
FlutterGetWidgetDescriptionResult.fromJson()
Implementation
factory FlutterGetWidgetDescriptionResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json) {
json ??= {};
if (json is Map) {
List<FlutterWidgetProperty> properties;
if (json.containsKey('properties')) {
properties = jsonDecoder.decodeList(
'$jsonPath.properties',
json['properties'],
(String jsonPath, Object? json) =>
FlutterWidgetProperty.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'properties');
}
return FlutterGetWidgetDescriptionResult(properties);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'flutter.getWidgetDescription result', json);
}
}