toMap method Null safety

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => <String, dynamic>{
      "startTime": startTime,
      "endTime": endTime,
      "limit": limit,
      "order": order?.index,
      "msgTypeList": msgTypeList
          ?.map((e) => NIMMessageTypeConverter(messageType: e).toValue())
          .toList(),
      "messageSubTypes": messageSubTypes,
      "allMessageTypes": allMessageTypes,
      "searchContent": searchContent,
      "fromIds": fromIds,
      "enableContentTransfer": enableContentTransfer,
    };