TextFieldX extension

on

Methods

bold() TextField
粗体
border({Color color = const Color(0xff95d9f1), double width = 1, double radius = 0}) TextField
color(Color color) TextField
colorInt(int color) TextField
copyWith({Key? key, TextEditingController? controller, FocusNode? focusNode, InputDecoration? decoration, 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
inputBorder(InputBorder border) TextField
isCollapsedThenContentPadding({double left = 0, double top = 0, double right = 0, double bottom = 0}) TextField
isCollapsedThenContentPaddingAll(double size) TextField
isCollapsedThenContentPaddingSymmetric({double horizontal = 0, double vertical = 0}) TextField
italic() TextField
斜体
letterSpacing(double spacing) TextField
字母间距,可为负数
lineLimit(int? num) TextField
lineSpacing(double spacing) TextField
行间距,倍数
noBorder() TextField
无边框
noLineLimit() TextField
无行数限制
noTextFieldBorder() 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
单词间距,可为负数