GlassPinField constructor

const GlassPinField({
  1. Key? key,
  2. int length = 6,
  3. TextEditingController? controller,
  4. FocusNode? focusNode,
  5. ValueChanged<String>? onChanged,
  6. ValueChanged<String>? onCompleted,
  7. bool obscure = false,
  8. bool error = false,
  9. bool enabled = true,
  10. bool autofocus = false,
  11. bool digitsOnly = true,
  12. TextInputType? keyboardType,
  13. double boxWidth = 44,
  14. double boxHeight = 52,
  15. double spacing = 8,
  16. String? semanticLabel,
})

Creates a code field; length must be positive.

Implementation

const GlassPinField({
  super.key,
  this.length = 6,
  this.controller,
  this.focusNode,
  this.onChanged,
  this.onCompleted,
  this.obscure = false,
  this.error = false,
  this.enabled = true,
  this.autofocus = false,
  this.digitsOnly = true,
  this.keyboardType,
  this.boxWidth = 44,
  this.boxHeight = 52,
  this.spacing = 8,
  this.semanticLabel,
}) : assert(length > 0);