copyWith method

EMOptions copyWith({
  1. bool? usingHttpsOnly,
  2. String? loginExtension,
  3. bool? deleteMessageWhenLeaveRoom,
  4. bool? deleteMessagesWhenLeaveGroup,
  5. bool? roomOwnerCanLeave,
  6. bool? autoAcceptGroupInvitation,
  7. bool? acceptInvitationAlways,
  8. bool? autoDownloadThumbnail,
  9. bool? requireDeliveryAck,
  10. bool? requireAck,
  11. bool? sortMessageByServerTime,
  12. bool? messagesReceiveCallbackIncludeSend,
  13. bool? regardImportMessagesAsRead,
})

Implementation

EMOptions copyWith({
  bool? usingHttpsOnly,
  String? loginExtension,
  bool? deleteMessageWhenLeaveRoom,
  bool? deleteMessagesWhenLeaveGroup,
  bool? roomOwnerCanLeave,
  bool? autoAcceptGroupInvitation,
  bool? acceptInvitationAlways,
  bool? autoDownloadThumbnail,
  bool? requireDeliveryAck,
  bool? requireAck,
  bool? sortMessageByServerTime,
  bool? messagesReceiveCallbackIncludeSend,
  bool? regardImportMessagesAsRead,
}) {
  return EMOptions(
    appKey: appKey,
    autoLogin: autoLogin,
    debugMode: debugMode,
    acceptInvitationAlways:
        acceptInvitationAlways ?? this.acceptInvitationAlways,
    autoAcceptGroupInvitation:
        autoAcceptGroupInvitation ?? this.autoAcceptGroupInvitation,
    requireAck: requireAck ?? this.requireAck,
    requireDeliveryAck: requireDeliveryAck ?? this.requireDeliveryAck,
    deleteMessagesAsExitGroup:
        deleteMessagesWhenLeaveGroup ?? this.deleteMessagesAsExitGroup,
    deleteMessagesAsExitChatRoom:
        deleteMessageWhenLeaveRoom ?? this.deleteMessagesAsExitChatRoom,
    isChatRoomOwnerLeaveAllowed:
        roomOwnerCanLeave ?? this.isChatRoomOwnerLeaveAllowed,
    sortMessageByServerTime:
        sortMessageByServerTime ?? this.sortMessageByServerTime,
    usingHttpsOnly: usingHttpsOnly ?? this.usingHttpsOnly,
    serverTransfer: serverTransfer,
    isAutoDownloadThumbnail:
        autoDownloadThumbnail ?? this.isAutoDownloadThumbnail,
    enableDNSConfig: enableDNSConfig,
    dnsUrl: dnsUrl,
    restServer: restServer,
    imPort: imPort,
    imServer: imServer,
    chatAreaCode: chatAreaCode,
    enableEmptyConversation: enableEmptyConversation,
    deviceName: deviceName,
    osType: osType,
    useReplacedMessageContents: useReplacedMessageContents,
    enableTLS: enableTLS,
    messagesReceiveCallbackIncludeSend: messagesReceiveCallbackIncludeSend ??
        this.messagesReceiveCallbackIncludeSend,
    regardImportMessagesAsRead:
        regardImportMessagesAsRead ?? this.regardImportMessagesAsRead,
    loginExtension: loginExtension,
  );
}