Parent.fromJson constructor

Parent.fromJson(
  1. Map<String, dynamic> json
)

Constructor parent from json.

This constructor receive a json from where the information is extracted.

Implementation

Parent.fromJson(Map<String, dynamic> json)
    : this.id = json[json['type']] ?? '',
      this.type = stringToParentType(json['type'] ?? '');