tf_3 method

Widget tf_3()

Implementation

Widget tf_3(){
  if(widget.countNumber < 3 ) return SizedBox();

  return TextFieldFastor(
      width: widget.widthOTP,
      padding: EdgeInsets.symmetric(vertical: widget.heightByPadding! ), //to set height
      maxLength: 1,
      textAlign: TextAlign.center,
      focusNode: tf3_node,
      autovalidateMode: tf3_valid,
      decorationBackground: widget.decoration,
      fontSize: widget.fontSize,
      text_color: widget.colorText,
      hint_color: widget.colorHint,
      fontFamily: widget.fontFamily,
      validatorCustom: ValidatorTemplate.equal( 1 ),
      keyboardType: TextInputType.number,
      onChanged: (s){
        //set value
        tf3_txt = s;

        //focus to after check have value
        if( s.length >= 1 ) {
          FocusScope.of(context).requestFocus(tf4_node);
        }

        //focus to previous
        if( s == "" ) {
          FocusScope.of(context).requestFocus(tf2_node);
        }

        //call back
        updateCallBack();
      },
      margin: EdgeInsets.only( right: widget.margin! )
  );
}