TextFieldX extension
Methods
-
bold()
→ TextField
-
粗体
-
border(InputBorder border)
→ TextField
-
-
color(Color color)
→ TextField
-
-
colorInt(int color)
→ TextField
-
-
copyWith({Key? key, TextEditingController? controller, FocusNode? focusNode, InputDecoration? decoration = const InputDecoration(), TextInputType? keyboardType, TextInputAction? textInputAction, TextCapitalization? textCapitalization, TextStyle? style, StrutStyle? strutStyle, TextAlign? textAlign, TextAlignVertical? textAlignVertical, TextDirection? textDirection, bool? readOnly, ToolbarOptions? toolbarOptions, bool? showCursor, bool? autofocus, String? obscuringCharacter, bool? obscureText, bool? autocorrect, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool? enableSuggestions, int? maxLines = 1, int? minLines, bool? expands, int? maxLength, bool? maxLengthEnforced, MaxLengthEnforcement? maxLengthEnforcement, void onChanged(String)?, void onEditingComplete()?, void onSubmitted(String)?, void onAppPrivateCommand(String, Map)?, List<TextInputFormatter>? inputFormatters, bool? enabled, double? cursorWidth, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, BoxHeightStyle? selectionHeightStyle, BoxWidthStyle? selectionWidthStyle, Brightness? keyboardAppearance, EdgeInsets? scrollPadding, DragStartBehavior? dragStartBehavior, bool? enableInteractiveSelection, TextSelectionControls? selectionControls, void onTap()?, MouseCursor? mouseCursor, Widget? buildCounter(BuildContext, {required int currentLength, required bool isFocused, required int? maxLength})?, ScrollController? scrollController, ScrollPhysics? scrollPhysics, Iterable<String>? autofillHints, Clip? clipBehavior, String? restorationId, bool? enableIMEPersonalizedLearning})
→ TextField
-
-
fontFamily(String family)
→ TextField
-
字体
配置中先注册family
-
fontSize(double size)
→ TextField
-
-
fontWeight(FontWeight? weight)
→ TextField
-
字体粗细、正斜等
-
hint(String hint)
→ TextField
-
set hintText
-
hintColor(Color color)
→ TextField
-
-
hintFamily(String family)
→ TextField
-
-
hintSize(double size)
→ TextField
-
-
hintStyle(TextStyle hintStyle)
→ TextField
-
-
hintWeight(FontWeight weight)
→ TextField
-
-
italic()
→ TextField
-
斜体
-
letterSpacing(double spacing)
→ TextField
-
字母间距,可为负数
-
lineLimit(int? num)
→ TextField
-
-
lineSpacing(double spacing)
→ TextField
-
行间距,倍数
-
noBorder()
→ TextField
-
无边框
-
noLineLimit()
→ TextField
-
无行数限制
-
overLine({bool active = true, Color? color})
→ TextField
-
上划线
-
singleLine()
→ TextField
-
-
strikethrough({bool active = true, Color? color})
→ TextField
-
删除线
-
textAlignment(TextAlign align)
→ TextField
-
-
underLine({bool active = true, Color? color})
→ TextField
-
下划线
-
wordSpacing(double spacing)
→ TextField
-
单词间距,可为负数