parseMultiLineMessage static method

Map<String, String?>? parseMultiLineMessage(
  1. NIMMessage message
)

Implementation

static Map<String, String?>? parseMultiLineMessage(NIMMessage message) {
  if (message.messageType == NIMMessageType.custom &&
      message.messageAttachment is NIMCustomMessageAttachment) {
    var data = (message.messageAttachment as NIMCustomMessageAttachment).data;
    if (data?[CustomMessageKey.type] ==
            CustomMessageType.customMultiLineMessageType &&
        data?[CustomMessageKey.data] is Map) {
      return (data![CustomMessageKey.data] as Map).cast<String, String?>();
    }
  }
  return null;
}