CustomOtptextfield constructor
const
CustomOtptextfield({ - Key? key,
- bool isCupertino = false,
- int maxLength = 4,
- TextEditingController? controller,
- bool hideCharacter = false,
- bool highlight = false,
- bool highlightAnimation = false,
- Color highlightAnimationBeginColor = Colors.white,
- Color highlightAnimationEndColor = Colors.black,
- Duration? highlightAnimationDuration,
- Color highlightColor = Colors.black,
- PinBoxDecoration? pinBoxDecoration,
- String maskCharacter = " ",
- double pinBoxWidth = 70.0,
- double pinBoxHeight = 70.0,
- TextStyle? pinTextStyle,
- OnDone? onDone,
- Color defaultBorderColor = Colors.black,
- Color hasTextBorderColor = Colors.black,
- AnimatedSwitcherTransitionBuilder? pinTextAnimatedSwitcherTransition,
- Duration pinTextAnimatedSwitcherDuration = const Duration(),
- bool hasError = false,
- Color errorBorderColor = Colors.red,
- dynamic onTextChanged(
- String
)?,
- bool autofocus = false,
- FocusNode? focusNode,
- WrapAlignment wrapAlignment = WrapAlignment.start,
- TextDirection textDirection = TextDirection.ltr,
- TextInputType keyboardType = TextInputType.number,
- EdgeInsets pinBoxOuterPadding = const EdgeInsets.symmetric(horizontal: 4.0),
- Color? pinBoxColor,
- Color? highlightPinBoxColor,
- double pinBoxBorderWidth = 2.0,
- double pinBoxRadius = 0,
- bool hideDefaultKeyboard = false,
- 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,
});