Search packages, repositories and app categories

GitHub repositoryoohyugi/sms_otp_auto_verify

sms_otp_auto_verify

oohyugi/sms_otp_auto_verify open-source repository details.

sms_otp_auto_verify project cover
Stars
10
Forks
41
Last push (UTC)
Aug 28, 2024
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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

codeLength must equals with Sms OTP Code length

TextFieldPin(
    textController: textEditingController,
    autoFocus: true,
    codeLength: _otpCodeLength,
    alignment: MainAxisAlignment.center,
    defaultBoxSize: 46.0,
    margin: 10,
    selectedBoxSize: 46.0,
    textStyle: TextStyle(fontSize: 16),
    defaultDecoration: _pinPutDecoration.copyWith(
    border: Border.all(
    color: Theme.of(context)
    .primaryColor
        .withOpacity(0.6))),
    selectedDecoration: _pinPutDecoration,
    onChange: (code) {
    _onOtpCallBack(code,false);
}),
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
Yogi Putra GitHub avatar
GitHub author

Yogi Putra ↗

LanguagesKotlinDartRubySwiftObjective-C

Packages published by this repository

Dependencies used

Dependency list 2 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗