MasterTextField constructor
const
MasterTextField({
- Key? key,
- TextEditingController? controller,
- FocusNode? focusNode,
- InputDecoration? decoration,
- String? labelText,
- TextStyle? labelStyle,
- String? hintText,
- TextStyle? hintStyle,
- String? prefixText,
- IconData? prefixIcon,
- Widget? prefix,
- BoxConstraints? prefixIconConstraints,
- TextStyle? prefixStyle,
- String? suffixText,
- IconData? suffixIcon,
- Widget? suffix,
- BoxConstraints? suffixIconConstraints,
- TextStyle? suffixStyle,
- Widget? prefixIconWidget,
- Widget? suffixIconWidget,
- String? helperText,
- TextStyle? helperStyle,
- int? helperMaxLines,
- String? counterText,
- TextStyle? counterStyle,
- InputCounterWidgetBuilder? buildCounter,
- String? semanticCounterText,
- String? errorText,
- TextStyle? errorStyle,
- int? errorMaxLines,
- bool isDense = false,
- EdgeInsetsGeometry? contentPadding,
- bool isCollapsed = false,
- BoxConstraints? constraints,
- FloatingLabelBehavior? floatingLabelBehavior,
- FloatingLabelAlignment? floatingLabelAlignment,
- bool? alignLabelWithHint,
- InputBorder? border,
- InputBorder? enabledBorder,
- InputBorder? disabledBorder,
- InputBorder? focusedBorder,
- InputBorder? errorBorder,
- InputBorder? focusedErrorBorder,
- bool filled = false,
- Color? fillColor,
- TextStyle? style,
- TextAlign textAlign = TextAlign.start,
- TextDirection? textDirection,
- TextAlignVertical? textAlignVertical,
- Color? cursorColor,
- double? cursorWidth,
- double? cursorHeight,
- Radius? cursorRadius,
- bool? cursorOpacityAnimates,
- TextInputType? keyboardType,
- TextInputAction? textInputAction,
- TextCapitalization textCapitalization = TextCapitalization.none,
- List<
TextInputFormatter> ? inputFormatters, - bool readOnly = false,
- bool enabled = true,
- bool obscureText = false,
- String obscuringCharacter = '•',
- bool autocorrect = true,
- bool? showCursor,
- bool enableSuggestions = true,
- bool enableInteractiveSelection = true,
- int? maxLines = 1,
- int? minLines,
- bool expands = false,
- int? maxLength,
- MaxLengthEnforcement? maxLengthEnforcement,
- bool autofocus = false,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - GestureTapCallback? onTap,
- VoidCallback? onEditingComplete,
- FormFieldValidator<
String> ? validator, - AutovalidateMode? autovalidateMode,
- String? restorationId,
- Brightness? keyboardAppearance,
- StrutStyle? strutStyle,
- EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
- bool? enableIMEPersonalizedLearning,
- ScrollController? scrollController,
- ScrollPhysics? scrollPhysics,
- bool selectAllOnFocus = false,
- EditableTextContextMenuBuilder? contextMenuBuilder,
- TextMagnifierConfiguration? magnifierConfiguration,
- SpellCheckConfiguration? spellCheckConfiguration,
- TextSelectionControls? selectionControls,
- SmartQuotesType? smartQuotesType,
- SmartDashesType? smartDashesType,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- bool canRequestFocus = true,
- void onTapOutside(
- PointerDownEvent event
- BoxHeightStyle? selectionHeightStyle,
- BoxWidthStyle? selectionWidthStyle,
- MouseCursor? mouseCursor,
- bool? stylusHandwritingEnabled,
- bool? scribbleEnabled,
- Clip clipBehavior = Clip.hardEdge,
- bool? enableInteractiveSelectionToolbar,
- List<
String> ? autofillHints,
Implementation
const MasterTextField({
super.key,
// Controller & Focus
this.controller,
this.focusNode,
// Decoration
this.decoration,
this.labelText,
this.labelStyle,
this.hintText,
this.hintStyle,
this.prefixText,
this.prefixIcon,
this.prefix,
this.prefixIconConstraints,
this.prefixStyle,
this.suffixText,
this.suffixIcon,
this.suffix,
this.suffixIconConstraints,
this.suffixStyle,
this.prefixIconWidget,
this.suffixIconWidget,
this.helperText,
this.helperStyle,
this.helperMaxLines,
this.counterText,
this.counterStyle,
this.buildCounter,
this.semanticCounterText,
this.errorText,
this.errorStyle,
this.errorMaxLines,
this.isDense = false,
this.contentPadding,
this.isCollapsed = false,
this.constraints,
this.floatingLabelBehavior,
this.floatingLabelAlignment,
this.alignLabelWithHint,
this.border,
this.enabledBorder,
this.disabledBorder,
this.focusedBorder,
this.errorBorder,
this.focusedErrorBorder,
this.filled = false,
this.fillColor,
// Text Styling
this.style,
this.textAlign = TextAlign.start,
this.textDirection,
this.textAlignVertical,
this.cursorColor,
this.cursorWidth,
this.cursorHeight,
this.cursorRadius,
this.cursorOpacityAnimates,
// Keyboard & Input
this.keyboardType,
this.textInputAction,
this.textCapitalization = TextCapitalization.none,
this.inputFormatters,
// Behavior
this.readOnly = false,
this.enabled = true,
this.obscureText = false,
this.obscuringCharacter = '•',
this.autocorrect = true,
this.showCursor,
this.enableSuggestions = true,
this.enableInteractiveSelection = true,
this.maxLines = 1,
this.minLines,
this.expands = false,
this.maxLength,
this.maxLengthEnforcement,
this.autofocus = false,
// Callbacks
this.onChanged,
this.onSubmitted,
this.onTap,
this.onEditingComplete,
// Validation
this.validator,
this.autovalidateMode,
// Advanced
this.restorationId,
this.keyboardAppearance,
this.strutStyle,
this.scrollPadding = const EdgeInsets.all(20.0),
this.enableIMEPersonalizedLearning,
// this.toolbarOptions,
this.scrollController,
this.scrollPhysics,
this.selectAllOnFocus = false,
this.contextMenuBuilder,
this.magnifierConfiguration,
this.spellCheckConfiguration,
// Editable/selection and gesture
this.selectionControls,
this.smartQuotesType,
this.smartDashesType,
this.dragStartBehavior = DragStartBehavior.start,
this.canRequestFocus = true,
this.onTapOutside,
this.selectionHeightStyle,
this.selectionWidthStyle,
// mouse / stylus / misc
this.mouseCursor,
this.stylusHandwritingEnabled,
this.scribbleEnabled,
this.clipBehavior = Clip.hardEdge,
// semantics: intentionally not removing any original props you had earlier
this.enableInteractiveSelectionToolbar,
// buildCounter included above
this.autofillHints
});