retrieveEnvlope method Null safety

Future<Envelope> retrieveEnvlope(
  1. String uri,
  2. XmlDocument soapRequest,
  3. {Function? postProcess}
)

Retrieve an onvif SOAP envelope

Implementation

static Future<Envelope> retrieveEnvlope(String uri, XmlDocument soapRequest,
    {Function? postProcess}) async {
  final soapResponse = await Soap.send(uri, soapRequest.toString());

  final envelope = Envelope.fromXml(soapResponse);

  if (postProcess != null) {
    postProcess(soapResponse, envelope);
  }

  return envelope;
}