ChatOptions constructor Null safety

ChatOptions(
  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 areaCode = AreaCode.GLOB}
)

Sets the app options.

Implementation

ChatOptions({
  /// Param [appKey] The app key that you get from the console when creating an app.
  required this.appKey,

  /// Param [autoLogin] Whether to enable automatic login.
  /// - `true`: (Default) Yes;
  /// - `false`: No.
  this.autoLogin = true,

  /// Param [debugModel] Whether to output the debug information. Make sure to call the method after the ChatClient is initialized. See [ChatClient.init].
  /// - `true`: Yes.
  /// - `false`: (Default) No.
  this.debugModel = false,

  /// Param [acceptInvitationAlways] Whether to accept friend invitations from other users automatically.
  /// - `true`: Yes;
  /// - `false`: (Default) No.
  this.acceptInvitationAlways = false,

  /// Param [autoAcceptGroupInvitation] Whether to accept group invitations automatically.
  /// - `true`: Yes;
  /// - `false`: (Default) No.
  this.autoAcceptGroupInvitation = false,

  /// Param [requireAck] Whether the read receipt is required.
  /// - `true`: (Default) Yes;
  /// - `false`: No.
  this.requireAck = true,

  /// Param [requireDeliveryAck] Whether the delivery receipt is required.
  /// - `true`: Yes;
  /// - `false`: (Default) No.
  this.requireDeliveryAck = false,

  /// Param [deleteMessagesAsExitGroup] Whether to delete the related group messages when leaving a group.
  /// - `true`: (Default) Yes;
  /// - `false`: No.
  this.deleteMessagesAsExitGroup = true,

  /// Param [deleteMessagesAsExitChatRoom] Whether to delete the related chat room messages when leaving the chat room.
  /// - `true`: (Default) Yes;
  /// - `false`: No.
  this.deleteMessagesAsExitChatRoom = true,

  /// Param [isChatRoomOwnerLeaveAllowed] Whether to allow the chat room owner to leave the chat room.
  /// - `true`: (Default) Yes;
  /// - `false`: No.
  this.isChatRoomOwnerLeaveAllowed = true,

  /// Param [sortMessageByServerTime] Whether to sort the messages by the time the server receives messages.
  /// - `true`: (Default) Yes;
  /// - `false`: No.
  this.sortMessageByServerTime = true,

  /// Param [usingHttpsOnly] Whether only HTTPS is used for REST operations.
  /// - `true`: (Default) Yes;
  /// - `false`: No.
  this.usingHttpsOnly = true,

  /// Param [serverTransfer] Whether to upload the message attachments automatically to the chat server.
  /// - `true`: (Default) Yes;
  /// - `false`: No.
  this.serverTransfer = true,

  /// Param [isAutoDownloadThumbnail] Whether to automatically download the thumbnail.
  /// - `true`: (Default) Yes;
  /// - `false`: No.
  this.isAutoDownloadThumbnail = true,

  /// Param [enableDNSConfig] Whether to enable DNS.
  /// - `true`: (Default) Yes;
  /// - `false`: No.
  this.enableDNSConfig = true,

  /// Param [dnsUrl] The DNS url.
  this.dnsUrl,

  /// Param [restServer] The REST server for private deployments.
  this.restServer,

  /// Param [imPort] The IM server port for private deployments.
  this.imPort,

  /// Param [imServer] The IM server URL for private deployment.
  this.imServer,

  /// Param [areaCode] The area code.
  this.areaCode = AreaCode.GLOB,
});