requestSMSCodeForUpdatingPhoneNumber static method Null safety

Future requestSMSCodeForUpdatingPhoneNumber(
  1. String mobile,
  2. {int ttl = 360,
  3. String? captchaToken}
)

Requests an SMS code for updating phone number.

Implementation

static Future requestSMSCodeForUpdatingPhoneNumber(String mobile,
    {int ttl = 360, String? captchaToken}) async {
  String path = 'requestChangePhoneNumber';
  Map<String, dynamic> data = {'mobilePhoneNumber': mobile, 'ttl': ttl};
  if (captchaToken != null) {
    data['validate_token'] = captchaToken;
  }
  await LeanCloud._httpClient.post(path, data: data);
}