PinCodeField constructor
const
PinCodeField({
- Key? key,
- required ValueChanged<
String> onChanged, - int length = 6,
- String obscuringCharacter = '☬',
- Color borderColor = Colors.blue,
- Color focusedBorderColor = Colors.white,
- Size cellSize = const Size(40, 50),
- double borderRadius = 5.0,
- Color fillColor = Colors.white,
- Color focusedFillColor = Colors.white,
- Color filledFillColor = Colors.white,
- bool autoFocus = true,
- bool obscureText = true,
- MaterialPinShape shape = MaterialPinShape.outlined,
- double borderWidth = 1.5,
- double focusedBorderWidth = 2.0,
- TextStyle textStyle = const TextStyle(fontSize: 24),
- bool showCursor = true,
- Color cursorColor = Colors.blue,
- double cursorWidth = 2,
Implementation
const PinCodeField({
super.key,
required this.onChanged,
this.length = 6,
this.obscuringCharacter = '☬',
this.borderColor = Colors.blue,
this.focusedBorderColor = Colors.white,
this.cellSize = const Size(40, 50),
this.borderRadius = 5.0,
this.fillColor = Colors.white,
this.focusedFillColor = Colors.white,
this.filledFillColor = Colors.white,
this.autoFocus = true,
this.obscureText = true,
this.shape = MaterialPinShape.outlined,
this.borderWidth = 1.5,
this.focusedBorderWidth = 2.0,
this.textStyle = const TextStyle(fontSize: 24),
this.showCursor = true,
this.cursorColor = Colors.blue,
this.cursorWidth = 2,
});