Skip to content

About

A flutter package which will help you to generate pin code fields with beautiful design and animations. Can be useful for OTP or pin code inputs ๐Ÿค“๐Ÿค“

Resources

Stars

0 stars

Watchers

0 watching

Forks

ย 
ย 

Latest commit

ย 

History

108 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Pin Code Fields

A highly customizable Flutter package for PIN code and OTP input fields with beautiful design and animations.

Version 9.0 introduces a new headless architecture - use the ready-made Material Design implementation or build completely custom UIs!

Package Location

The publishable package is located at:

packages/pin_code_fields/

๐Ÿ“ฆ View Package README for full documentation.

Quick Start

dependencies:
  pin_code_fields: ^9.0.0
import 'package:pin_code_fields/pin_code_fields.dart';

// Material Design (ready to use)
MaterialPinField(
  length: 6,
  onCompleted: (pin) => print('PIN: $pin'),
)

// Custom UI (headless)
PinInput(
  length: 4,
  builder: (context, cells) => YourCustomUI(cells),
)

Repository Structure

pin_code_fields/
โ”œโ”€โ”€ packages/
โ”‚   โ””โ”€โ”€ pin_code_fields/      # ๐Ÿ“ฆ Main package
โ”‚       โ”œโ”€โ”€ lib/
โ”‚       โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”‚       โ”œโ”€โ”€ core/     # Headless input engine
โ”‚       โ”‚       โ””โ”€โ”€ material/ # Material Design implementation
โ”‚       โ”œโ”€โ”€ example/
โ”‚       โ”œโ”€โ”€ test/
โ”‚       โ”œโ”€โ”€ README.md
โ”‚       โ”œโ”€โ”€ CHANGELOG.md
โ”‚       โ””โ”€โ”€ LICENSE
โ”œโ”€โ”€ docs/
โ”‚   โ””โ”€โ”€ FEATURE_COMPARISON.md
โ”œโ”€โ”€ melos.yaml
โ””โ”€โ”€ CLAUDE.md

Development

This project uses melos for monorepo management.

# Install melos
dart pub global activate melos

# Bootstrap workspace
melos bootstrap

# Run tests
melos test

# Run analyzer
melos analyze

Features

  • ๐ŸŽจ Headless Architecture - Full control over UI rendering
  • ๐Ÿ“ฑ Material Design Ready - Beautiful out-of-the-box implementation
  • ๐ŸŽฎ Unified Controller - Single controller for text, focus, and errors
  • โœจ Rich Animations - Scale, fade, slide entry animations
  • ๐Ÿ” Obscure Support - Character or custom widget obscuring
  • ๐Ÿ“‹ Paste Support - Long-press to paste from clipboard
  • ๐Ÿ“ Form Integration - Works with Flutter's Form widget
  • ๐Ÿ“ฒ Autofill Support - SMS OTP autofill for iOS/Android
  • ๐Ÿ’ซ Error Animation - Shake animation with programmatic control

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE for details.

About

A flutter package which will help you to generate pin code fields with beautiful design and animations. Can be useful for OTP or pin code inputs ๐Ÿค“๐Ÿค“

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages