copyWith method

ChatConfig copyWith({
  1. String? databasePath,
  2. String? encryptionKey,
  3. bool? enableLogging,
  4. int? maxRetryAttempts,
  5. Duration? heartbeatInterval,
  6. Duration? syncInterval,
})

Creates a copy with updated fields.

Implementation

ChatConfig copyWith({
  String? databasePath,
  String? encryptionKey,
  bool? enableLogging,
  int? maxRetryAttempts,
  Duration? heartbeatInterval,
  Duration? syncInterval,
}) {
  return ChatConfig(
    databasePath: databasePath ?? this.databasePath,
    encryptionKey: encryptionKey ?? this.encryptionKey,
    enableLogging: enableLogging ?? this.enableLogging,
    maxRetryAttempts: maxRetryAttempts ?? this.maxRetryAttempts,
    heartbeatInterval: heartbeatInterval ?? this.heartbeatInterval,
    syncInterval: syncInterval ?? this.syncInterval,
  );
}