toMap method

Map<String, dynamic> toMap()

Converts a MessageParams object into a map.

Implementation

Map<String, dynamic> toMap() => {
      'toJid': toJid,
      'replyMessageId': replyMessageId,
      'messageType': messageType.value,
      'mentionedUsersIds': null,
      //List<String>.from(mentionedUsersIds.map((x) => x)),
      'metaData': List<dynamic>.from(metaData.map((x) => x.toMap())),
      'textMessage': textMessageParams?.toMap(),
      'locationMessage': locationMessageParams?.toMap(),
      'contactMessage': contactMessageParams?.toMap(),
      'fileMessage': fileMessageParams?.toMap(),
      'topicId': topicId,
    };