tf_5 method
Implementation
Widget tf_5(){
if(widget.countNumber < 5 ) return SizedBox();
return TextFieldFastor(
width: widget.widthOTP,
padding: EdgeInsets.symmetric(vertical: widget.heightByPadding! ), //to set height
maxLength: 1,
textAlign: TextAlign.center,
focusNode: tf5_node,
autovalidateMode: tf5_valid,
validatorCustom: ValidatorTemplate.equal( 1 ),
keyboardType: TextInputType.number,
decorationBackground: widget.decoration,
fontSize: widget.fontSize,
text_color: widget.colorText,
hint_color: widget.colorHint,
fontFamily: widget.fontFamily,
onChanged: (s){
//set value
tf5_txt = s;
//focus to after check have value
if( s.length >= 1 ) {
FocusScope.of(context).requestFocus(tf6_node);
}
//focus to previous
if( s == "" ) {
FocusScope.of(context).requestFocus(tf4_node);
}
//call back
updateCallBack();
},
margin: EdgeInsets.only( right: widget.margin! )
);
}