requestVerifyCode static method

Future<VerifyCodeResult?> requestVerifyCode(
  1. String countryCode,
  2. String phoneNumber,
  3. VerifyCodeSettings settings
)

Applies for a verification code using a mobile number.

Implementation

static Future<VerifyCodeResult?> requestVerifyCode(
    String countryCode, String phoneNumber, VerifyCodeSettings settings) {
  return PlatformAuth.methodChannel
      .invokeMethod('requestPhoneVerifyCode', <String, dynamic>{
        'countryCode': countryCode,
        'phoneNumber': phoneNumber,
        'settings': settings.toMap(),
      })
      .then((value) => value != null ? VerifyCodeResult.fromMap(value) : null)
      .catchError(PlatformAuth.handlePlatformException);
}