otp_verification_flutter 0.1.2
otp_verification_flutter: ^0.1.2 copied to clipboard
An animated, fully customizable OTP verification widget for Flutter, with native autofill support (SMS / QuickType) and idle, verifying, success and error states.
Changelog #
All notable changes to this package are documented here. The format follows Keep a Changelog and semantic versioning.
0.1.1 #
Changed #
- English
pubspec.yamldescription andCHANGELOG.
Fixed #
- Replaced the deprecated
Color.withOpacitywith a version-agnostic helper (no analyzer INFO on recent Flutter, still builds on Flutter 3.10). - Removed files that were accidentally shipped in
0.1.0(a leftoverlib/main.dart, a stray rootandroid/folder, and the example app's generated platform folders). Added a.pubignore. - README demo image now uses an absolute URL so it renders on pub.flutter-io.cn.
0.1.0 #
First release.
Added #
OtpController— state (idle/verifying/success/error), focus, current code,reset(),fillAll()for autofill.OtpField— a row of animated OTP boxes: auto-focus, auto-advance, pop-in on fill, glow on focus, horizontal shake on error.- Native autofill via
AutofillHints.oneTimeCode(SMS Retriever on Android / QuickType on iOS), toggled withenableAutofill. OtpVerificationWidget— full state-driven screen: title / subtitle, boxes, "Resend" link, "Continue" button.OtpMergeView— the verification choreography: the boxes slide to the center and merge into a single card the size of one box, a pulsing loader, then a green checkmark (pop + glow) + label + button, or a red shake followed by the card splitting back into empty boxes.OtpFieldTheme— complete theme (per-state colors, radius, size, border, durations/curves,mergeDuration) withdarkGlowandlightMinimalpresets andcopyWith.- Full customization of every
OtpVerificationWidgettext (title,verifyingTitle,verifyingSubtitle,successTitle,successSubtitle,continueLabel,resendLabel,didntGetCodeLabel). - Style customization:
continueButtonStyle,continueButtonTextStyle,resendLabelStyle,didntGetCodeStyle.
Fixed #
- Backspace on a filled box now clears that box instead of wiping the previous box and moving focus back to it.