CustomOtptextfield constructor

const CustomOtptextfield({
  1. Key? key,
  2. bool isCupertino = false,
  3. int maxLength = 4,
  4. TextEditingController? controller,
  5. bool hideCharacter = false,
  6. bool highlight = false,
  7. bool highlightAnimation = false,
  8. Color highlightAnimationBeginColor = Colors.white,
  9. Color highlightAnimationEndColor = Colors.black,
  10. Duration? highlightAnimationDuration,
  11. Color highlightColor = Colors.black,
  12. PinBoxDecoration? pinBoxDecoration,
  13. String maskCharacter = " ",
  14. double pinBoxWidth = 70.0,
  15. double pinBoxHeight = 70.0,
  16. TextStyle? pinTextStyle,
  17. OnDone? onDone,
  18. Color defaultBorderColor = Colors.black,
  19. Color hasTextBorderColor = Colors.black,
  20. AnimatedSwitcherTransitionBuilder? pinTextAnimatedSwitcherTransition,
  21. Duration pinTextAnimatedSwitcherDuration = const Duration(),
  22. bool hasError = false,
  23. Color errorBorderColor = Colors.red,
  24. dynamic onTextChanged(
    1. String
    )?,
  25. bool autofocus = false,
  26. FocusNode? focusNode,
  27. WrapAlignment wrapAlignment = WrapAlignment.start,
  28. TextDirection textDirection = TextDirection.ltr,
  29. TextInputType keyboardType = TextInputType.number,
  30. EdgeInsets pinBoxOuterPadding = const EdgeInsets.symmetric(horizontal: 4.0),
  31. Color? pinBoxColor,
  32. Color? highlightPinBoxColor,
  33. double pinBoxBorderWidth = 2.0,
  34. double pinBoxRadius = 0,
  35. bool hideDefaultKeyboard = false,
  36. bool hasUnderline = false,
})

Implementation

const CustomOtptextfield({
  super.key,
  this.isCupertino= false,
  this.maxLength= 4,
  this.controller,
  this.hideCharacter= false,
  this.highlight= false,
  this.highlightAnimation= false,
  this.highlightAnimationBeginColor= Colors.white,
  this.highlightAnimationEndColor= Colors.black,
  this.highlightAnimationDuration,
  this.highlightColor= Colors.black,
  this.pinBoxDecoration,
  this.maskCharacter= " ",
  this.pinBoxWidth= 70.0,
  this.pinBoxHeight= 70.0,
  this.pinTextStyle,
  this.onDone,
  this.defaultBorderColor= Colors.black,
  this.hasTextBorderColor= Colors.black,
  this.pinTextAnimatedSwitcherTransition,
  this.pinTextAnimatedSwitcherDuration= const Duration(),
  this.hasError= false,
  this.errorBorderColor= Colors.red,
  this.onTextChanged,
  this.autofocus= false,
  this.focusNode,
  this.wrapAlignment= WrapAlignment.start,
  this.textDirection= TextDirection.ltr,
  this.keyboardType= TextInputType.number,
  this.pinBoxOuterPadding = const EdgeInsets.symmetric(horizontal: 4.0),
  this.pinBoxColor,
  this.highlightPinBoxColor,
  this.pinBoxBorderWidth = 2.0,
  this.pinBoxRadius = 0,
  this.hideDefaultKeyboard = false,
  this.hasUnderline = false,
});