StandardPart.fromJson constructor

StandardPart.fromJson(
  1. Map<String, Object?> json
)

Deserializes a part from a JSON map.

Implementation

factory StandardPart.fromJson(Map<String, Object?> json) {
  final type = json[Part.typeKey] as String;
  final JsonToPartConverter<StandardPart> converter =
      _standardPartConverterRegistry[type]!;
  return converter.convert(json);
}