AGConnectCloudDBZoneConfig constructor
AGConnectCloudDBZoneConfig(
- {required String zoneName,
- AGConnectCloudDBZoneSyncProperty syncProperty = AGConnectCloudDBZoneSyncProperty.CLOUDDBZONE_CLOUD_CACHE,
- AGConnectCloudDBZoneAccessProperty accessProperty = AGConnectCloudDBZoneAccessProperty.CLOUDDBZONE_PUBLIC,
- int capacity = 104857600,
- bool isPersistenceEnabled = true,
- String key = '',
- 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.');
}
}