ChatMedia.fromMap constructor
Creates a new ChatMedia from a map (e.g. decoded JSON).
Throws if the required keys are missing or of the wrong type.
Implementation
factory ChatMedia.fromMap(Map<String, dynamic> map) {
return ChatMedia(
url: map['url'] as String,
mediaType: MediaType.fromString(map['mediaType'] as String),
);
}