signInWithPhoneNumber method Null safety

Future<ConfirmationResult> signInWithPhoneNumber(
  1. String phoneNumber,
  2. [RecaptchaVerifier? verifier]
)

Starts a sign-in flow for a phone number.

You can optionally provide a RecaptchaVerifier instance to control the reCAPTCHA widget apperance and behaviour.

Once the reCAPTCHA verification has completed, called ConfirmationResult.confirm with the users SMS verification code to complete the authentication flow.

This method is only available on web based platforms.

Implementation

Future<ConfirmationResult> signInWithPhoneNumber(
  String phoneNumber, [
  RecaptchaVerifier? verifier,
]) async {
  assert(phoneNumber.isNotEmpty);

  verifier ??= RecaptchaVerifier();
  return ConfirmationResult._(
    this,
    await _delegate.signInWithPhoneNumber(phoneNumber, verifier.delegate),
  );
}