deleteCloudDBZone method

Future<void> deleteCloudDBZone(
  1. {required String zoneName}
)

You can invoke this method to delete a Cloud DB zone object that is no longer used on the device. You can delete Cloud DB zone only after Cloud DB zone is closed.

If you no longer need Cloud DB zone and its data, you can call this method to delete Cloud DB zone. After Cloud DB zone is deleted, the data files stored on the disk are deleted when the memory resources are released. If you attempt to repeatedly delete Cloud DB zone or delete an inexistent Cloud DB zone, the system returns a success message without exception.

Implementation

Future<void> deleteCloudDBZone({
  required String zoneName,
}) async {
  if (zoneName.isEmpty) {
    throw FormatException('zoneName cannot be an empty string.', zoneName);
  }
  try {
    return await _methodChannel.invokeMethod<void>(
      _MethodConstants.DELETE_CLOUD_DB_ZONE,
      <String, dynamic>{
        _KeyConstants.ZONE_NAME: zoneName,
      },
    );
  } catch (e) {
    throw AGConnectCloudDBException._from(e);
  }
}