YIMAttachmentExt_Video.fromJson constructor

YIMAttachmentExt_Video.fromJson(
  1. Map<String, dynamic> map
)

Implementation

YIMAttachmentExt_Video.fromJson(Map<String, dynamic> map) {
  type = YIMEnum_AttachmentType.from(map["duration"]?.toString());
  duration = double.tryParse(map["duration"]?.toString() ?? "0")?.toInt() ?? 0;
  image = map["image"]?.toString() ?? "";
  compress = map["compress"]?.toString() == "1";
}