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

FileDescription
MIGRATION_GUIDE.mdComplete migration guide with step-by-step instructions
QUICK_REFERENCE.mdPrintable quick reference card for common changes
EXAMPLES.mdReal-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 + FocusNode to PinInputController
  • Combining fieldWidth/fieldHeight into cellSize: Size(w, h)
  • Moving form validation to PinInputFormField wrapper
  • 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

Need Help?