sms_otp_auto_verify 1.2.1 copy "sms_otp_auto_verify: ^1.2.1" to clipboard
sms_otp_auto_verify: ^1.2.1 copied to clipboard

outdated

A new Flutter plugin to enter a digit code usually in cases of Sms Otp Code. and provide SMS Auto Fill using library SMS Retriever API.

sms_otp_auto_verify #

A new Flutter plugin to enter a digit code usually in cases of Sms Otp Code. and provide SMS Auto Fill using library SMS Retriever API.

Example App

Getting Started #

Import package #

import 'package:sms_otp_auto_verify/sms_otp_auto_verify.dart';

Get Signature Code #

  String signature = await SmsRetrieved.getAppSignature();

Add Widget #

codeLength must equals with Sms OTP Code length

TextFieldPin(
                  filled: true,
                  filledColor: Colors.grey[100],
                  codeLength: _otpCodeLength,
                  boxSize: 48,
                  onOtpCallback: (code, isAutofill) =>
                      _onOtpCallBack(code, isAutofill),
                )

Listen result from OtpListTextField #

_onOtpCallBack(String otpCode, bool isAutofill) {
    setState(() {
      this._otpCode = otpCode;
      if (otpCode.length == _otpCodeLength && isAutofill) {
        _enableButton = false;
        _isLoadingButton = true;
        _verifyOtpCode();
      } else if (otpCode.length == _otpCodeLength && !isAutofill) {
        _enableButton = true;
        _isLoadingButton = false;
      }else{
        _enableButton = false;
      }
    });
  }

Example Sms #

<#> ExampleApp: Your code is 5664
   r64Iw/6mD1D
83
likes
0
pub points
94%
popularity

Publisher

unverified uploader

A new Flutter plugin to enter a digit code usually in cases of Sms Otp Code. and provide SMS Auto Fill using library SMS Retriever API.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on sms_otp_auto_verify