getPresets method

Future<List<Preset>> getPresets(
  1. String profileToken
)

Operation to request all PTZ presets for the Preset in the selected profile. The operation is supported if there is support for at least one PTZ preset by the Preset.

Implementation

Future<List<Preset>> getPresets(String profileToken) async {
  final envelope = await Soap.retrieveEnvlope(
      uri, onvif.secureRequest(SoapRequest.presets(profileToken)));

  if (envelope.body.getPresetResponse == null) throw Exception();

  return envelope.body.getPresetResponse!.presets;
}