Skip to content
pubscout

otp_pin_field

1.5.2, released 4 months ago by an unverified publisher

Generate customizable pin code and OTP input fields with animations.

$ flutter pub add otp_pin_field
Source repository

What it does

Provides a customizable Flutter widget for entering PIN codes and one-time passwords (OTP). Supports custom animations, borders, colors, masking, custom keyboards, and SMS autofill features.

AI-written summary of version 1.5.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need an OTP or PIN input field in your app.
  • You require customizable box styles, borders, and animations for each pin character.

Skip it when

  • You are building standard text form fields without segmented pin inputs.

Strengths

  • Highly customizable field styles, borders, and animations
  • Supports SMS autofill and custom keyboard options
  • Cross-platform support for Android, iOS, and Web

Weaknesses

  • Limited documentation on advanced configurations beyond the properties table

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
2

Not documented

OtpPinField(
  fieldCount: 4,
  onSubmit: (text) {
    print('Entered pin is $text');
  },
  onChange: (text) {
    print('On change pin is $text');
  },
)

Alternatives

Packages that do the same job and could replace otp_pin_field.

  • pinput

    Another popular package for customizable pin code and OTP inputs.

  • pin_code_fields

    An alternative widget specifically designed for PIN code and OTP text fields.

Works with

Packages commonly used together with otp_pin_field: ones it builds on, ones built on it, and its own family.