AGConnectCloudDBZoneConfig constructor

AGConnectCloudDBZoneConfig(
  1. {required String zoneName,
  2. AGConnectCloudDBZoneSyncProperty syncProperty = AGConnectCloudDBZoneSyncProperty.CLOUDDBZONE_CLOUD_CACHE,
  3. AGConnectCloudDBZoneAccessProperty accessProperty = AGConnectCloudDBZoneAccessProperty.CLOUDDBZONE_PUBLIC,
  4. int capacity = 104857600,
  5. bool isPersistenceEnabled = true,
  6. String key = '',
  7. String reKey = ''}
)

Implementation

AGConnectCloudDBZoneConfig({
  required this.zoneName,
  this.syncProperty =
      AGConnectCloudDBZoneSyncProperty.CLOUDDBZONE_CLOUD_CACHE,
  this.accessProperty = AGConnectCloudDBZoneAccessProperty.CLOUDDBZONE_PUBLIC,
  this.capacity = 104857600,
  this.isPersistenceEnabled = true,
  String key = '',
  String reKey = '',
})  : isEncrypted = key.isNotEmpty,
      _key = key,
      _reKey = reKey {
  if (zoneName.isEmpty) {
    throw FormatException('zoneName cannot be an empty string.', zoneName);
  }
  if (key.isEmpty && reKey.isNotEmpty) {
    throw const FormatException(
        'key cannot be empty when reKey has a value.');
  }
}