stop method Null safety

Future<bool> stop(
  1. String profileToken,
  2. {bool panTilt = true,
  3. bool zoom = true}
)

Operation to stop ongoing pan, tilt and zoom movements of absolute relative and continuous type. If no stop argument for pan, tilt or zoom is set, the device will stop all ongoing pan, tilt and zoom movements.

Implementation

Future<bool> stop(String profileToken,
    {bool panTilt = true, bool zoom = true}) async {
  loggy.debug('stop');

  final envelope = await Soap.retrieveEnvelope(
      uri,
      onvif.secureRequest(
          SoapRequest.stop(profileToken, panTilt: panTilt, zoom: zoom)));

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

  return true;
}