otp_pin_field
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.
1.5.2
2.6K downloads/mo
#4872 most downloaded on pub.dev
shivbo96/otp_pin_field
What this package is like to depend on
Last release 1 months ago
19 Jul 2026
Release timing varies
gaps range from 3 weeks to 1.3 years
Nearly every release is documented
notes for 43 of 43 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
43 releases · first in 2021
3 releases in the last 12 months
see the full history below
Release timeline
43 releases · Sep 2021 to Jul 2026Releases
latest 43-
1.5.219 Jul 2026Release notes
Open source →- iOS SwiftPM Product Name Fix:
- Renamed the library product name in
Package.swiftfromotp_pin_fieldtootp-pin-field(with hyphens) to align with Flutter's package product name generation.
- Renamed the library product name in
- iOS SwiftPM Product Name Fix:
-
1.5.118 Jul 2026Release notes
Open source →- iOS SwiftPM Build Fix:
- Removed the invalid remote dependency on
flutter/packagesinPackage.swiftthat was causing SwiftPM dependency resolution failure.
- Removed the invalid remote dependency on
- iOS SwiftPM Build Fix:
-
1.5.015 Jul 2026Release notes
Open source →- Swift Package Manager (SPM) Migration:
- Migrated the native iOS codebase to fully support Swift Package Manager (SPM).
- Upgraded minimum iOS platform target to iOS 12.0 (
.iOS(.v12)inPackage.swiftands.platform = :ios, '12.0'inotp_pin_field.podspec). - Simplified the iOS module to a modern Swift-only plugin by removing the legacy Objective-C bridge files (
OtpPinFieldPlugin.h&OtpPinFieldPlugin.m). - Exposed the Swift class registration to Objective-C using the
@objcannotation for complete backward compatibility.
- Accessibility & Testing Enhancements:
- Added
Semanticswrapper with the keyotp_pin_field_containerand label'otp_pin_field_container'around the field row layout. - Embedded testing automation
Keyidentifiers to inner TextFields, cell boxes, spacers, and cursors.
- Added
- Swift Package Manager (SPM) Migration:
-
1.4.103 Apr 2025Release notes
Open source →- Changelog & Readme:
- Revised the changelog to document the latest changes.
- Updated Readme file.
- Changelog & Readme:
-
1.4.013 Feb 2025Release notes
Open source →Added:
- New Flutter 3.29.0 Example:
- Introduced a new example compatible with Flutter 3.29.0 to demonstrate plugin usage more effectively.
Improvements:
OtpPinFieldPlugin** Registration Fix:**- Resolved an issue with the plugin's registration mechanism to improve reliability and stability.
- Dependency Updates:
- Updated project dependencies to their latest compatible versions for enhanced performance and security.
Updated:
- Changelog & Pubspec File:
- Revised the changelog to document the latest changes.
- Updated
pubspec.yamlto reflect new version and dependency updates.
- New Flutter 3.29.0 Example:
-
1.3.220 Jan 2025Release notes
Open source →Added:
unFocusOnEndingOption:- Introduced a new
unFocusOnEndingproperty in theOtpPinFieldto improve usability. - When enabled, the field will automatically lose focus once the user has completed input (default:
false). Improvements:
- Introduced a new
- Build Configuration Modernization:
- Updated
build.gradleto adopt Java 17 and Kotlin JVM target 17 for better compatibility and performance: compileOptions.sourceCompatibilityupdated fromJavaVersion.VERSION_1_8toJavaVersion.VERSION_17.kotlinOptions.jvmTargetupdated from1.8to17.- These changes align the project with modern Java/Kotlin standards and ensure support for newer tools and libraries. Acknowledged:
- WebAssembly Compatibility:
- Community feedback to use the
universal_htmlpackage for WebAssembly compatibility (--wasm) has been acknowledged. - This enhancement is under review for future implementation.
- Updated
-
1.3.125 Oct 2024 -
1.3.024 Oct 2024Release notes
Open source →Added:
- Hint Text Support: Added new properties to show hint text in the OTP pin field:
showHintText: Allows displaying hint text inside the pin fields (default:false).hintText: Customizable hint text to display (default:'0').hintTextColor: Customize the color of the hint text (default:Colors.black45).
Improvements:
- Added logic to respect
autoFillEnableflag, ensuring thatautofillHintsis set tonullwhenautoFillEnable == false. This prevents the SMS hint from being displayed when autofill is disabled.
Fixed:
- Fixed autofocus behavior on the web. Autofocus is now correctly respected on web platforms if the
autoFocusproperty is enabled.
- Hint Text Support: Added new properties to show hint text in the OTP pin field:
-
1.3.0+125 Oct 2024Release notes
Open source →Documentation:
- Updated package with web,Macos,Windows and Linux support.
- Formatted changelog file to include the latest versions.
- updated README file with the latest changes and usage instructions.
-
1.3.0+225 Oct 2024Release notes
Open source →Documentation:
- Formatted changelog file to include the latest versions.
- Updated README file with the latest changes and usage instructions.
-
1.2.910 Jul 2024Release notes
Open source →Improvements:
- Added handling for keyboard not opening issue in webview apps.
- Improved focus management for webview apps in the
onFieldFocusmethod.
Bug Fixes:
- Fixed potential issues with the decoration logic by consolidating it within
BoxDecoration. - Addressed minor inconsistencies in field highlighting and cursor behavior.
Documentation:
- Updated README file with the latest changes and usage instructions.
- Updated changelog file with version 1.2.9 release notes.
-
1.2.9+130 Jul 2024Release notes
Open source →Improvements:
- Add conditional for AGP <4.2 compatibility in Android configuration
Documentation:
- Updated changelog file with version 1.2.9+1 release notes.
-
1.2.804 Jul 2024Release notes
Open source →Added:
- Box border support for
defaultPinBoxDecoration,roundedPinBoxDecoration, andcustominotpPinFieldDecoration. - Enhanced customization options for OTP pin fields, including border radius and box shadow properties.
Fixed:
- Clarified the usage of
borderRadiusproperty withotpPinFieldDecoration.customto avoid confusion when usingunderlinedPinBoxDecoration.
Updated:
- Updated documentation and example code to demonstrate new features and proper usage of custom decorations.
- Box border support for
-
1.2.8+109 Jul 2024Release notes
Open source →Improvements:
- Refactored
OtpPinFieldStateto streamline decoration handling. - Removed
foregroundBoxDecorationand integrated its logic intoBoxDecoration. - Improved handling of
fieldBorderGradientwith a fallback mechanism. - Enhanced code readability and maintainability.
Bug Fixes:
- Fixed potential issues with the decoration logic by consolidating it within
BoxDecoration. - Addressed minor inconsistencies in field highlighting and cursor behavior.
- Refactored
-
1.2.704 Jul 2024Release notes
Open source →feat: Add support for custom border colors and width in OTP pin field
- Added ability to customize border colors using defaultFieldBorderColor and activeFieldBorderColor properties.
- Introduced fieldBorderWidth property to set the width of the border.
- Updated documentation to guide users on how to achieve custom border effects.
-
1.2.7+104 Jul 2024 -
1.2.603 Jul 2024Release notes
Open source →- Resolved an issue where the keyboard would not open after clearing all text fields.
-
1.2.6+103 Jul 2024 -
1.2.502 Jul 2024Release notes
Open source →feat: Resolve autofillHints for iOS, enable suggestions and autocorrect, manage keyboard for Android
- Resolved the issue with
autofillHintsnot working on iOS by properly wrapping TextFields inAutofillGroup. - Improved keyboard handling for Android to ensure seamless user interaction.
- Added a demo implementation for OTP autofill using
AutofillHints.oneTimeCodein a TextField. - Wrapped TextFields in
AutofillGroupto support autofill functionalities. - Ensured
enableSuggestionsandautocorrectproperties are set to true in relevant TextFields. - Managed keyboard types and behaviors for both iOS and Android to ensure consistent behavior across platforms.
- Resolved the issue with
-
1.2.5+203 Jul 2024Release notes
Open source →feat: Add flexibility to change border width for custom OtpPinFieldDecoration and handle OTP copy-paste scenarios
- Added support to change border width in custom
OtpPinFieldDecorationfor enhanced customization. - Improved OTP copy-paste functionality:
- Handled cases where copied string includes non-numeric characters.
- Managed scenarios where copied numeric string is shorter than the max length of the OTP PinField.
- Updated documentation for the
beforeTextPastefunction to provide clear guidance on usage. - Updated CHANGELOG and README to reflect new features and improvements.
Documentation:
- Added details about new border width customization option in
OtpPinFieldDecoration. - Provided examples and explanation on handling copy-paste functionality for OTP fields.
- Added support to change border width in custom
-
1.2.414 May 2024Release notes
Open source →- Added
border gradient color property for active pin field boxin OtpPinFieldStyle - Added
border gradient color property for filled pin field boxin OtpPinFieldStyle - Added
border gradient color property for default pin field boxin OtpPinFieldStyle - dart formatted
- Added
-
1.2.313 May 2024Release notes
Open source →- Added copy paste OTP feature
- Added
border gradient color propertyin OtpPinFieldStyle - dart formatted
-
1.2.218 Jul 2023 -
1.2.118 Jul 2023Release notes
Open source →- fixed minor issue with animated cursor
- added
prefilled color propertyin OtpPinFieldStyle - documentation updated
-
1.2.020 Apr 2023 -
1.2.0+120 Apr 2023 -
1.2.0+220 Apr 2023 -
1.1.202 Jan 2023Release notes
Open source →- Added functionality to add custom keyboard and also added ability to hide/un-hide the default keyboard of the OS
-
1.1.2+120 Jan 2023 -
1.1.2+220 Jan 2023 -
1.1.101 Dec 2022 -
1.1.1+101 Dec 2022 -
1.1.1+201 Dec 2022 -
1.1.030 Nov 2022Release notes
Open source →Stableanimation ,accessibility to manage otp pin field spacing and also added custom keyboard option in place on default keyboard
-
1.1.0+130 Nov 2022 -
1.0.429 Nov 2022 -
1.0.4+130 Nov 2022 -
1.0.329 Nov 2022Release notes
Open source →- added cursor with animation ,accessibility to manage otp pin field spacing and also added custom keyboard option in place on default keyboard
-
1.0.229 Jul 2022 -
1.0.124 Feb 2022 -
1.0.005 Sep 2021 -
0.0.205 Sep 2021 -
0.0.105 Sep 2021