Attachment.fromJson constructor

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

Deserializes json into an Attachment Object

Implementation

Attachment.fromJson(Map<String, dynamic> json)
    : name = json['name'],
      url = Uri.parse(json['url']),
      type = json['type'],
      smallThumbnail = json['smallThumbnail'] != null
          ? Uri.parse(json['smallThumbnail'])
          : null,
      largeThumbnail = json['largeThumbnail'] != null
          ? Uri.parse(json['largeThumbnail'])
          : null;