ReplicatorConfiguration constructor

ReplicatorConfiguration({
  1. required Endpoint target,
  2. ReplicatorType replicatorType = ReplicatorType.pushAndPull,
  3. bool continuous = false,
  4. Authenticator? authenticator,
  5. bool acceptOnlySelfSignedServerCertificate = false,
  6. CryptoData? pinnedServerCertificate,
  7. PemData? trustedRootCertificates,
  8. Map<String, String>? headers,
  9. bool enableAutoPurge = true,
  10. bool acceptParentDomainCookies = false,
  11. Duration? heartbeat,
  12. int? maxAttempts,
  13. Duration? maxAttemptWaitTime,
})

Creates a configuration for a Replicator.

Implementation

ReplicatorConfiguration({
  required this.target,
  this.replicatorType = ReplicatorType.pushAndPull,
  this.continuous = false,
  this.authenticator,
  bool acceptOnlySelfSignedServerCertificate = false,
  this.pinnedServerCertificate,
  this.trustedRootCertificates,
  this.headers,
  this.enableAutoPurge = true,
  this.acceptParentDomainCookies = false,
  Duration? heartbeat,
  int? maxAttempts,
  Duration? maxAttemptWaitTime,
}) : _collections = {} {
  this
    ..acceptOnlySelfSignedServerCertificate =
        acceptOnlySelfSignedServerCertificate
    ..heartbeat = heartbeat
    ..maxAttempts = maxAttempts
    ..maxAttemptWaitTime = maxAttemptWaitTime;
}