TitleProp.fromJson constructor

TitleProp.fromJson(
  1. Map<String, dynamic> json, {
  2. String? subfield,
})

Create a new property instance from json.

Receive a json from where the information is extracted.

Implementation

TitleProp.fromJson(Map<String, dynamic> json, {String? subfield})
    : this.name = json['name'] ?? '',
      this.content = Text.fromListJson(((subfield != null
                  ? json[propertyTypeToString(PropertiesTypes.Title)]
                      [subfield]
                  : json[propertyTypeToString(PropertiesTypes.Title)]) ??
              []) as List)
          .toList(),
      super(id: json['id']);