flutter_otp_text_field
1.5.1+1, released 2 years ago by davidcobbina.com
Fully customizable OTP entry text field widget supporting any pin length.
WASM-ready
What it does
Provides a customizable OTP text field widget for Flutter that splits pin entry across multiple boxes or dashes. It supports custom styling per field, obscure text, clearing text, auto-focus, paste functionality, and callbacks for input changes and submission.
AI-written summary of version 1.5.1+1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a dedicated OTP or verification code entry screen element
- You want customized text fields with specific styles for pin inputs
Skip it when
- You need a full form validation and building framework rather than just an OTP entry component
Strengths
- Pure Dart with no extra dependencies
- Supports custom input decorations and text styles for individual fields
- Built-in support for pasting OTP codes and clearing text
Weaknesses
- Limited to OTP and pin entry use cases
- No built-in animation system mentioned beyond basic states
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
OtpTextField(
numberOfFields: 5,
borderColor: Color(0xFF512DA8),
showFieldAsBox: true,
onCodeChanged: (String code) {},
onSubmit: (String verificationCode){},
)Alternatives
Packages that do the same job and could replace flutter_otp_text_field.
- pinput
Alternative customizable PIN/OTP input package with extensive formatting and validation features.
93Compare - pin_code_fields
Another popular alternative for handling PIN and OTP inputs in Flutter.
93Compare