createSubscription method Null safety

Future<Response> createSubscription(
  1. {required String phoneNo,
  2. required String keyword,
  3. required String checkoutToken}
)

Subscribes a phone number

It requires; phoneNo (The phoneNumber to be subscribed) keyword (The premium keyword under the above short code mapped to your account.) checkoutToken (This is a token used to validate the subscription request)

Implementation

Future<http.Response> createSubscription({
  required String phoneNo,
  required String keyword,
  required String checkoutToken,
})async {
  return await africasTalking.httpPostProcess(
    africasTalking.isLive ? smsSubscribeCreateLiveUrl : smsSubscribeCreateTestUrl,
    {
      'shortCode': shortCode,
      'phoneNumber': phoneNo,
      'checkoutToken': checkoutToken,
      'keyword': keyword,
    }
  );
}