ChatOptions constructor

  1. {required String appKey,
  2. bool autoLogin = true,
  3. bool debugModel = false,
  4. bool acceptInvitationAlways = false,
  5. bool autoAcceptGroupInvitation = false,
  6. bool requireAck = true,
  7. bool requireDeliveryAck = false,
  8. bool deleteMessagesAsExitGroup = true,
  9. bool deleteMessagesAsExitChatRoom = true,
  10. bool isChatRoomOwnerLeaveAllowed = true,
  11. bool sortMessageByServerTime = true,
  12. bool usingHttpsOnly = true,
  13. bool serverTransfer = true,
  14. bool isAutoDownloadThumbnail = true,
  15. bool enableDNSConfig = true,
  16. String? dnsUrl,
  17. String? restServer,
  18. int? imPort,
  19. String? imServer,
  20. int chatAreaCode = ChatAreaCode.GLOB,
  21. bool enableEmptyConversation = false,
  22. String? deviceName,
  23. int? osType}

Sets the app options.

Param appKey The app key that you get from the console when creating an app.

Param autoLogin Whether to enable automatic login.

Param debugModel Whether to output the debug information. Make sure to call the method after the ChatClient is initialized. See ChatClient.init.

Param acceptInvitationAlways Whether to accept friend invitations from other users automatically.

Param autoAcceptGroupInvitation Whether to accept group invitations automatically.

Param requireAck Whether the read receipt is required.

Param requireDeliveryAck Whether the delivery receipt is required.

Param deleteMessagesAsExitGroup Whether to delete the related group messages when leaving a group.

Param deleteMessagesAsExitChatRoom Whether to delete the related chat room messages when leaving the chat room.

Param isChatRoomOwnerLeaveAllowed Whether to allow the chat room owner to leave the chat room.

Param sortMessageByServerTime Whether to sort the messages by the time the server receives messages.

Param usingHttpsOnly Whether only HTTPS is used for REST operations.

Param serverTransfer Whether to upload the message attachments automatically to the chat server.

Param isAutoDownloadThumbnail Whether to automatically download the thumbnail.

Param enableDNSConfig Whether to enable DNS.

Param dnsUrl The DNS url.

Param restServer The REST server for private deployments.

Param imPort The IM server port for private deployments.

Param imServer The IM server URL for private deployment.

Param chatAreaCode The area code.

Param enableEmptyConversation Whether to include empty conversations when the SDK loads conversations from the local database.


  required this.appKey,
  this.autoLogin = true,
  this.debugModel = false,
  this.acceptInvitationAlways = false,
  this.autoAcceptGroupInvitation = false,
  this.requireAck = true,
  this.requireDeliveryAck = false,
  this.deleteMessagesAsExitGroup = true,
  this.deleteMessagesAsExitChatRoom = true,
  this.isChatRoomOwnerLeaveAllowed = true,
  this.sortMessageByServerTime = true,
  this.usingHttpsOnly = true,
  this.serverTransfer = true,
  this.isAutoDownloadThumbnail = true,
  this.enableDNSConfig = true,
  this.chatAreaCode = ChatAreaCode.GLOB,
  this.enableEmptyConversation = false,