verifyMobilePhone static method

Future verifyMobilePhone(
  1. String mobile,
  2. String code
)

Requests to verify a user's mobile number with sms code they received.

Implementation

static Future verifyMobilePhone(String mobile, String code) async {
  if (isNullOrEmpty(mobile)) {
    throw ArgumentError.notNull('mobile');
  }
  if (isNullOrEmpty(code)) {
    throw ArgumentError.notNull('code');
  }
  String path = 'verifyMobilePhone/$code';
  Map<String, dynamic> data = {'mobilePhoneNumber': mobile};
  await LeanCloud._httpClient.post(path, data: data);
}