copyWith method
ChatConfig
copyWith({
- String? apiUrl,
- bool? enableTypingIndicators,
- bool? enableReadReceipts,
- bool? enableOnlineStatus,
- bool? autoMarkAsRead,
- int? connectionTimeout,
- int? maxReconnectionAttempts,
- int? chatRoomRefreshInterval,
- String? userId,
- String? token,
- Map<
String, String> ? additionalHeaders, - Map<
String, dynamic> ? socketParams, - bool? debugMode,
- Future<
String> fileUploadHandler(- String filePath
Create a copy of this config with some values changed
Implementation
ChatConfig copyWith({
String? apiUrl,
bool? enableTypingIndicators,
bool? enableReadReceipts,
bool? enableOnlineStatus,
bool? autoMarkAsRead,
int? connectionTimeout,
int? maxReconnectionAttempts,
int? chatRoomRefreshInterval,
String? userId,
String? token,
Map<String, String>? additionalHeaders,
Map<String, dynamic>? socketParams,
bool? debugMode,
Future<String> Function(String filePath)? fileUploadHandler,
}) {
return ChatConfig(
apiUrl: apiUrl ?? this.apiUrl,
enableTypingIndicators:
enableTypingIndicators ?? this.enableTypingIndicators,
enableReadReceipts: enableReadReceipts ?? this.enableReadReceipts,
enableOnlineStatus: enableOnlineStatus ?? this.enableOnlineStatus,
autoMarkAsRead: autoMarkAsRead ?? this.autoMarkAsRead,
connectionTimeout: connectionTimeout ?? this.connectionTimeout,
maxReconnectionAttempts:
maxReconnectionAttempts ?? this.maxReconnectionAttempts,
chatRoomRefreshInterval:
chatRoomRefreshInterval ?? this.chatRoomRefreshInterval,
userId: userId ?? this.userId,
token: token ?? this.token,
additionalHeaders: additionalHeaders ?? this.additionalHeaders,
socketParams: socketParams ?? this.socketParams,
debugMode: debugMode ?? this.debugMode,
fileUploadHandler: fileUploadHandler ?? this.fileUploadHandler,
);
}