ChatConfig.withEncryption constructor

ChatConfig.withEncryption({
  1. required String databasePath,
  2. required String encryptionKey,
  3. bool enableLogging = false,
  4. int maxRetryAttempts = 10,
  5. Duration heartbeatInterval = const Duration(seconds: 30),
  6. Duration syncInterval = const Duration(minutes: 5),
})

Create configuration with encryption enabled.

Implementation

factory ChatConfig.withEncryption({
  required String databasePath,
  required String encryptionKey,
  bool enableLogging = false,
  int maxRetryAttempts = 10,
  Duration heartbeatInterval = const Duration(seconds: 30),
  Duration syncInterval = const Duration(minutes: 5),
}) {
  return ChatConfig(
    databasePath: databasePath,
    encryptionKey: encryptionKey,
    enableLogging: enableLogging,
    maxRetryAttempts: maxRetryAttempts,
    heartbeatInterval: heartbeatInterval,
    syncInterval: syncInterval,
  );
}