YIMAttachmentExt_Audio.fromJson constructor

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

Implementation

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