PinCodeField constructor

const PinCodeField({
  1. Key? key,
  2. required ValueChanged<String> onChanged,
  3. int length = 6,
  4. String obscuringCharacter = '☬',
  5. Color borderColor = Colors.blue,
  6. Color focusedBorderColor = Colors.white,
  7. Size cellSize = const Size(40, 50),
  8. double borderRadius = 5.0,
  9. Color fillColor = Colors.white,
  10. Color focusedFillColor = Colors.white,
  11. Color filledFillColor = Colors.white,
  12. bool autoFocus = true,
  13. bool obscureText = true,
  14. MaterialPinShape shape = MaterialPinShape.outlined,
  15. double borderWidth = 1.5,
  16. double focusedBorderWidth = 2.0,
  17. TextStyle textStyle = const TextStyle(fontSize: 24),
  18. bool showCursor = true,
  19. Color cursorColor = Colors.blue,
  20. 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,
});