absoluteMove method Null safety

Future<bool> absoluteMove(
  1. String profileToken,
  2. PtzPosition place,
  3. [PtzPosition? speed]
)

Operation to move pan,tilt or zoom to a absolute destination.

The speed argument is optional. If an x/y speed value is given it is up to the device to either use the x value as absolute resulting speed vector or to map x and y to the component speed. If the speed argument is omitted, the default speed set by the PtzConfiguration will be used.

Implementation

Future<bool> absoluteMove(String profileToken, PtzPosition place,
    [PtzPosition? speed]) async {
  loggy.debug('absoluteMove');

  final envelope = await transport.sendRequest(
      uri,
      transport.securedEnvelope(
          soap.PtzRequest.absoluteMove(profileToken, place, speed)));

  if (envelope.body.hasFault) {
    throw Exception(envelope.body.fault.toString());
  }

  return true;
}