bindPhone static method

Future<AuthResult> bindPhone(
  1. String phoneNumber,
  2. String passCode, [
  3. String? phoneCountryCode
])

bind phone to current user.

Implementation

static Future<AuthResult> bindPhone(String phoneNumber, String passCode,
    [String? phoneCountryCode]) async {
  Map map = {};
  map.putIfAbsent('phoneNumber', () => phoneNumber);
  map.putIfAbsent('passCode', () => passCode);
  if (phoneCountryCode != null) {
    map.putIfAbsent('phoneCountryCode', () => phoneCountryCode);
  }
  final Result result = await post('/api/v3/bind-phone', jsonEncode(map));
  return AuthResult(result);
}