call method Null safety

Future<Response> call(
  1. {required List<String> to,
  2. String? clientRequestId}
)

Make an outbound call

Requires to a list of recipients’ phone numbers

Implementation

Future<http.Response> call({
  required List<String> to, String? clientRequestId
})async{
  return await africasTalking.httpPostProcess(
    africasTalking.isLive ? callLiveUrl : callTestUrl,
    {
      'from': phoneNo,
      'to': to.toString(),
      if(clientRequestId != null) ...{'clientRequestId': clientRequestId}
    }
  );

}