send method Null safety
- List<
AirtimeRecipient> recipients
Sends Airtime
Requires recipients a list of AirtimeRecipient, which os just (recipient phone number, amount, currency)
Implementation
Future<http.Response> send(
List<AirtimeRecipient> recipients
)async{
return await africasTalking.httpPostProcess(
africasTalking.isLive ? airtimeLiveUrl : airtimeTestUrl,
{
'recipients': json.encode(recipients.map((e) => e.asMap()).toList())
}
);
}