sendSms static method

Future<AuthResult> sendSms(
  1. String phone, [
  2. String? phoneCountryCode
])

send an SMS code.

Implementation

static Future<AuthResult> sendSms(String phone,
    [String? phoneCountryCode]) async {
  Map map = {};
  map.putIfAbsent('phone', () => phone);
  if (phoneCountryCode != null) {
    map.putIfAbsent('phoneCountryCode', () => phoneCountryCode);
  }
  final Result result = await post('/api/v2/sms/send', jsonEncode(map));
  return AuthResult(result);
}