PinField
The Pin Field widget is a specialized input field for entering a sequence of characters, commonly used for OTP (One-Time Password) or security code entry.
Properties
length
The number of characters in the pin code.
enabled
If false
, the pin field is disabled.
autoFocus
If true
, the pin field will automatically be focused when the screen loads.
obscureText
If true
, the entered characters will be obscured.
obscureSymbol
The character to use for obscuring the text (e.g., *
, •
).
Pin Theme Properties
These properties define the appearance of each individual character field in the pin input.
width
The width of each pin field box.
height
The height of each pin field box.
margin
The margin around each pin field box.
padding
The padding within each pin field box.
textStyle
The TextStyle for the entered characters.
fillColor
The background color of each pin field box.
borderColor
The border color of each pin field box.
borderWidth
The border width of each pin field box.
borderRadius
The corner radius of each pin field box.
Events
onChanged
An action to trigger whenever a character is entered or changed.
onCompleted
An action to trigger when all characters of the pin have been entered.
Default Properties
The Pin Field widget supports the following section of Default Properties:
Layout
width
height
padding
margin
align
Last updated