VField2 constructor

const VField2({
  1. Key? key,
  2. String? text = '',
  3. String hintText = '',
  4. String? labelText,
  5. TextEditingController? controller,
  6. TextInputType keyboardType = TextInputType.text,
  7. TextInputAction? textInputAction = TextInputAction.done,
  8. FocusNode? focusNode,
  9. bool isPwd = false,
  10. Widget? leftWidget,
  11. Widget? rightWidget,
  12. int? maxLength,
  13. bool isShowDeleteBtn = false,
  14. List<TextInputFormatter>? inputFormatters,
  15. _InputCallBack? inputCallBack,
  16. _InputCompletionCallBack? inputCompletionCallBack,
  17. String? pwdOpen,
  18. String? pwdClose,
  19. bool isDense = false,
  20. EdgeInsetsGeometry? contentPadding,
  21. bool showRedStar = false,
  22. TextStyle? hintStyle,
  23. TextStyle? textStyle,
  24. double pwdEyeSize = 22,
  25. String? pwdEyeColor,
  26. String? focusBorderColor,
  27. String? unfocusBorderColor,
  28. TextAlign? textAlign,
  29. bool isReadonly = false,
  30. bool needStarPlaceholder = true,
  31. bool hideLine = false,
  32. Color? searchBgColor,
  33. VoidCallback? clickInput,
  34. bool longShowDel = false,
  35. bool isAllBorder = false,
})

Implementation

const VField2(
    {Key? key,
      this.text = '',
      this.hintText = '',
      this.labelText,
      this.controller, //有text呢,还有回调事件  这个可以在页面不传
      this.keyboardType = TextInputType.text,
      this.textInputAction = TextInputAction.done,
      this.focusNode,
      this.isPwd = false,
      this.leftWidget,
      this.rightWidget,
      this.maxLength,
      this.isShowDeleteBtn = false,
      this.inputFormatters,
      this.inputCallBack,
      this.inputCompletionCallBack,
      this.pwdOpen,
      this.pwdClose,
      // this.border,
      this.isDense = false, //设置为true则输入框的文本垂直方向空隙更小
      this.contentPadding,
      this.showRedStar = false,
      // this.hintFontSize = 17,
      // this.hintColor,
      this.hintStyle,
      this.textStyle,
      this.pwdEyeSize = 22,
      this.pwdEyeColor,
      // this.isShowBorder = true,
      this.focusBorderColor,
      // this.cursorColor,
      this.unfocusBorderColor,
      this.textAlign,
      this.isReadonly = false,
      this.needStarPlaceholder = true,
      this.hideLine = false,
      this.searchBgColor,
      this.clickInput,
      this.longShowDel = false, this.isAllBorder = false})
    : super(key: key);