Skip to content
pubscout

pin_code_text_field

1.8.0, released 6 years ago by an unverified publisher

Customizable pin code input widget for Flutter

WASM-readyRepository archived
$ flutter pub add pin_code_text_field
Source repository

What it does

Provides a highly configurable UI component for entering numeric or alphanumeric pin codes, supporting features like masking, custom styling, underline, and error highlighting.

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

Use it when

  • Implementing OTP or login PIN screens
  • Need a ready‑made, theme‑aware pin input field
  • Want to customize pin box appearance and behavior

Skip it when

  • Building a complex form with many input types that requires a unified form builder
  • Needing advanced validation logic beyond simple pin length

Strengths

  • Rich customization options (decoration, animation, underline)
  • Supports both Material and Cupertino apps
  • Web and desktop platforms supported
  • Handles paste and cursor behavior well

Weaknesses

  • No built‑in form validation or integration with form libraries
  • Limited to pin input only, not a general form field
  • Requires manual handling of controller and callbacks

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add dependency and import package

import 'package:pin_code_text_field/pin_code_text_field.dart';

PinCodeTextField(
  maxLength: 6,
  onDone: (value) => print('Pin entered: $value'),
);

Alternatives

Packages that do the same job and could replace pin_code_text_field.

  • pinput

    Similar pin input widget with active community and more recent updates

Works with

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