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 SmsVerification.getAppSignature();

Add Widget

codeLength must equals with Sms OTP Code length

    textController: textEditingController,
    autoFocus: true,
    codeLength: _otpCodeLength,
    defaultBoxSize: 46.0,
    margin: 10,
    selectedBoxSize: 46.0,
    textStyle: TextStyle(fontSize: 16),
    defaultDecoration: _pinPutDecoration.copyWith(
    border: Border.all(
    color: Theme.of(context)
    selectedDecoration: _pinPutDecoration,
    onChange: (code) {

Listen result from OtpListTextField

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

Example Sms

<#> ExampleApp: Your code is 5664