toJson method Null safety

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['appKey'] = this.appKey;
  data['autoLogin'] = this.autoLogin;
  data['debugModel'] = this.debugModel;
  data['acceptInvitationAlways'] = this.acceptInvitationAlways;
  data['autoAcceptGroupInvitation'] = this.autoAcceptGroupInvitation;
  data['deleteMessagesAsExitGroup'] = this.deleteMessagesAsExitGroup;
  data['deleteMessagesAsExitChatRoom'] = this.deleteMessagesAsExitChatRoom;
  data['dnsUrl'] = this.dnsUrl;
  data['enableDNSConfig'] = this.enableDNSConfig;
  data['imPort'] = this.imPort;
  data['imServer'] = this.imServer;
  data['isAutoDownload'] = this.isAutoDownload;
  data['isChatRoomOwnerLeaveAllowed'] = this.isChatRoomOwnerLeaveAllowed;
  data['requireAck'] = this.requireAck;
  data['requireDeliveryAck'] = this.requireDeliveryAck;
  data['restServer'] = this.restServer;
  data['serverTransfer'] = this.serverTransfer;
  data['sortMessageByServerTime'] = this.sortMessageByServerTime;
  data['usingHttpsOnly'] = this.usingHttpsOnly;
  if (this.pushConfig != null) {
    data['pushConfig'] = this.pushConfig!.toJson();
  }
  return data;
}