Skip to content

kinleyrabgay/otp_input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OtpInputField

A Flutter package that provides a customizable OTP (One-Time Password) input field.

Installation

To use this package, add otp_input as a dependency in your pubspec.yaml file:

dependencies:
  otp_input: ^1.0.3

Then run

flutter pub get

Usage

Import the package in your Dart file:

import 'package:otp_input/otp_input.dart';

Add the OtpInputField widget to your widget tree:

OtpInputField(
  otpInputFieldCount: 4,
  width: 0.2,
  onOtpEntered: (otp) {
    print('Entered OTP: $otp');
    // Perform actions with the entered OTP
  },
)

Properties

  • otpInputFieldCount: The number of OTP input fields.
  • width: The width factor of each input field, a value between 0.0 and 1.0.
  • onOtpEntered: Callback function triggered when all OTP fields are filled.

Issues and Contributions

Feel free to open issues or contribute to this package on GitHub.

About

A simple OTP (One-Time Password) field.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages