OTPTextFieldV2 class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- OTPTextFieldV2
Constructors
-
OTPTextFieldV2({Key? key, int length = 4, double width = 10, OtpFieldControllerV2? controller, double fieldWidth = 30, double spaceBetween = 0, OtpFieldStyle? otpFieldStyle, bool hasError = false, TextInputType keyboardType = TextInputType.number, TextStyle style = const TextStyle(), double outlineBorderRadius = 10, TextCapitalization textCapitalization = TextCapitalization.none, MainAxisAlignment textFieldAlignment = MainAxisAlignment.spaceBetween, bool obscureText = false, FieldStyle fieldStyle = FieldStyle.underline, ValueChanged<
String> ? onChanged, List<TextInputFormatter> ? inputFormatter, EdgeInsets contentPadding = const EdgeInsets.symmetric(horizontal: 4, vertical: 8), bool isDense = false, ValueChanged<String> ? onCompleted, TextDirection? textDirection, Color? cursorColor, bool autoFocus = false}) -
OTPTextField Constructor
const
Properties
- autoFocus → bool
-
Change auto Focus on first field
final
- contentPadding → EdgeInsets
-
content padding of the text fields
final
- controller → OtpFieldControllerV2?
-
TextField Controller
final
- cursorColor → Color?
-
Change cursor color
final
- fieldStyle → FieldStyle
-
Text Field Style for field shape.
default FieldStyle.underline FieldStyle
final
- fieldWidth → double
-
Width of the single OTP Field
final
- hasError → bool
-
show the error border or not
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
inputFormatter
→ List<
TextInputFormatter> ? -
Input Formatter
final
- isDense → bool
-
Whether the InputDecorator.child is part of a dense form (i.e., uses less vertical
space).
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardType → TextInputType
-
Manage the type of keyboard that shows up
final
- length → int
-
Number of the OTP Fields
final
- obscureText → bool
-
Obscure Text if data is sensitive
final
-
onChanged
→ ValueChanged<
String> ? -
Callback function, called when a change is detected to the pin.
final
-
onCompleted
→ ValueChanged<
String> ? -
Callback function, called when pin is completed.
final
- otpFieldStyle → OtpFieldStyle?
-
Text Field Style
final
- outlineBorderRadius → double
-
The style to use for the text being edited.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spaceBetween → double
-
space between the text fields
final
- style → TextStyle
-
The style to use for the text being edited.
final
- textCapitalization → TextCapitalization
-
final
- textDirection → TextDirection?
-
Modify the input direction in the OTP fields.
final
- textFieldAlignment → MainAxisAlignment
-
Text Field Alignment
default: MainAxisAlignment.spaceBetween MainAxisAlignment
final
- width → double
-
Total Width of the OTP Text Field
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → OTPTextFieldV2State -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited