toMap method Null safety

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => <String, dynamic>{
      "sessionId": sessionId,
      "sessionType":
          NIMSessionTypeConverter(sessionType: sessionType).toValue(),
      "fromAccount": fromAccount,
      "time": time,
      "content": content,
      "sendToOnlineUserOnly": sendToOnlineUserOnly,
      "apnsText": apnsText,
      "pushPayload": pushPayload,
      "config": config?.toMap(),
      "antiSpamOption": antiSpamOption?.toMap(),
      "env": env,
    };