BoxOtpDecorator class

BoxOtpDecorator renders OTP fields with boxed borders and customizable corner radius. Uses an OutlineInputBorder with rounded corners and optional fill color. The hint character displays when the field is empty.

Implemented types

Constructors

BoxOtpDecorator({Color borderColor = Colors.grey, Color focusedBorderColor = Colors.black, Color errorBorderColor = Colors.red, double borderRadius = 8.0, double borderWidth = 1.0, Color fillColor = Colors.transparent, String hintChar = '', TextStyle? hintStyle})

Properties

borderColor Color
final
borderRadius double
final
borderWidth double
final
errorBorderColor Color
final
fillColor Color
final
focusedBorderColor Color
final
hashCode int
The hash code for this object.
no setterinherited
hintChar String
final
hintStyle TextStyle?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getDecoration({bool hasError = false}) InputDecoration
Returns the InputDecoration for the OTP field at the given index. Provides isFilled to indicate if this field currently has input.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited