requestLoginSMSCode static method

Future requestLoginSMSCode(
  1. String mobile,
  2. {String? validateToken}
)

Requests a login sms code to be sent to the mobile number of an existing user.

Implementation

static Future requestLoginSMSCode(String mobile,
    {String? validateToken}) async {
  if (isNullOrEmpty(mobile)) {
    throw ArgumentError.notNull('mobile');
  }
  Map<String, dynamic> data = {'mobilePhoneNumber': mobile};
  if (validateToken != null) {
    data['validate_token'] = validateToken;
  }
  await LeanCloud._httpClient.post('requestLoginSmsCode', data: data);
}