QsTextView constructor
const
QsTextView({
- Key? key,
- TextEditingController? controller,
- String? placeholder,
- Color textColor = Colors.black,
- Color? placeholderColor,
- TextAlign textAlign = TextAlign.left,
- String? fontFamily,
- double? fontSize,
- FontWeight? fontWeight,
- int? maxLines,
- int? maxLength,
- bool isShowCounterText = false,
- bool autofocus = false,
- FocusNode? focusNode,
- TextInputType? keyboardType,
- bool enable = true,
- bool isDense = true,
- TextInputAction? textInputAction,
- VoidCallback? onTap,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted,
创建一个文本输入框。
controller 用于读写输入内容,placeholder 为占位提示文字;
当 keyboardType 为 TextInputType.number 时仅允许输入数字。
Implementation
const QsTextView({
super.key,
this.controller,
this.placeholder,
this.textColor = Colors.black,
this.placeholderColor,
this.textAlign = TextAlign.left,
this.fontFamily,
this.fontSize,
this.fontWeight,
this.maxLines,
this.maxLength,
this.isShowCounterText = false,
this.autofocus = false,
this.focusNode,
this.keyboardType,
this.enable = true,
this.isDense = true,
this.textInputAction,
this.onTap,
this.onChanged,
this.onSubmitted,
});