MessageEvent.fromJson constructor

MessageEvent.fromJson(
  1. dynamic eventData
)

Implementation

factory MessageEvent.fromJson(dynamic eventData) {
  return MessageEvent(
    customText: eventData['customText'] ?? '',
    from: eventData['from'] ?? '',
    senderJid: eventData['senderJid'] ?? '',
    time: eventData['time'] ?? '0',
    isReadSent: eventData['isReadSent'] ?? 0,
    id: eventData['id'] ?? '',
    type: eventData['type'] ?? '',
    body: eventData['body'] ?? '',
    msgtype: eventData['msgtype'] ?? '',
    bubbleType: eventData['bubbleType'] ?? '',
    mediaURL: eventData['mediaURL'] ?? '',
    presenceType: eventData['presenceType'] ?? '',
    presenceMode: eventData['presenceMode'] ?? '',
    chatStateType: eventData['chatStateType'] ?? '',
  );
}