v9.3.0pin_code_fields
一个高度可定制的 PIN/OTP 输入字段,支持 Material Design,并具有用于自定义 UI 的无头核心。
一个 Flutter 包,可帮助您生成设计精美且带有动画效果的验证码输入框。对于 OTP 或密码输入非常有用 🤓🤓
^6.0.0以下为英文项目原文快照,最新内容请访问 GitHub。
https://i.ibb.co/X5qxF7x/export-banner.png
https://img.shields.io/pub/v/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!
The publishable package is located at:
packages/pin_code_fields/
📦 View Package README for full documentation.
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),
)
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
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
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details.