pin_code_fields 9.4.0
SDKflutter
Platformandroidioswindowslinuxmacosweb
A flutter package which will help you to generate pin code fields. Can be useful for OTP for example.
Migration Resources for pin_code_fields v9.0.0
This directory contains migration resources to help you upgrade from v8.x to v9.0.0.
Contents
| File | Description |
|---|---|
| MIGRATION_GUIDE.md | Complete migration guide with step-by-step instructions |
| QUICK_REFERENCE.md | Printable quick reference card for common changes |
| EXAMPLES.md | Real-world before/after code examples |
Quick Start
1. Read the Migration Guide
Start with the MIGRATION_GUIDE.md for a complete walkthrough of all changes.
2. Use IDE Find & Replace
See QUICK_REFERENCE.md for regex patterns you can use in your IDE's find & replace for common renames.
3. Handle Manual Changes
Some changes require manual updates:
- Converting
TextEditingController+FocusNodetoPinInputController - Combining
fieldWidth/fieldHeightintocellSize: Size(w, h) - Moving form validation to
PinInputFormFieldwrapper - Replacing error stream with
controller.triggerError()
Key Changes Summary
Widget: PinCodeTextField → MaterialPinField
Theme: PinTheme → MaterialPinTheme
Controller: TextEditingController → PinInputController
Size: fieldWidth + fieldHeight → cellSize: Size(w, h)
Shapes: PinCodeFieldShape.box → MaterialPinShape.outlined
Colors: activeColor → filledBorderColor
selectedColor → focusedBorderColor
inactiveColor → borderColor
Error: StreamController → controller.triggerError()
Form: Built-in validator → PinInputFormField wrapper