PlatformTextField constructor
PlatformTextField({
- Key? key,
- Key? widgetKey,
- TextEditingController? controller,
- FocusNode? focusNode,
- TextInputType? keyboardType,
- TextInputAction? textInputAction,
- TextCapitalization? textCapitalization = TextCapitalization.none,
- TextStyle? style,
- TextAlign? textAlign,
- bool? autofocus,
- bool? obscureText,
- bool? autocorrect,
- int? maxLines = 1,
- int? maxLength,
- void onChanged()?,
- void onEditingComplete()?,
- void onSubmitted()?,
- List<
TextInputFormatter> ? inputFormatters, - bool? enabled,
- double? cursorWidth,
- Radius? cursorRadius,
- Color? cursorColor,
- Brightness? keyboardAppearance,
- EdgeInsets? scrollPadding,
- DragStartBehavior? dragStartBehavior,
- int? minLines,
- bool? expands,
- ScrollPhysics? scrollPhysics,
- StrutStyle? strutStyle,
- bool? enableInteractiveSelection,
- ScrollController? scrollController,
- GestureTapCallback? onTap,
- bool? readOnly,
- bool? showCursor,
- TextAlignVertical? textAlignVertical,
- SmartDashesType? smartDashesType,
- SmartQuotesType? smartQuotesType,
- BoxHeightStyle? selectionHeightStyle,
- BoxWidthStyle? selectionWidthStyle,
- String? obscuringCharacter,
- Iterable<
String> ? autofillHints, - double? cursorHeight,
- String? restorationId,
- MaxLengthEnforcement? maxLengthEnforcement,
- TextSelectionControls? selectionControls,
- String? hintText,
- bool? enableIMEPersonalizedLearning,
- bool makeCupertinoDecorationNull = false,
- Clip clipBehavior = Clip.hardEdge,
- bool scribbleEnabled = true,
- EditableTextContextMenuBuilder? contextMenuBuilder,
- TapRegionCallback? onTapOutside,
- SpellCheckConfiguration? spellCheckConfiguration,
- TextMagnifierConfiguration? magnifierConfiguration,
- ContentInsertionConfiguration? contentInsertionConfiguration,
- bool? cursorOpacityAnimates,
- UndoHistoryController? undoController,
- PlatformBuilder<
MaterialTextFieldData> ? material, - PlatformBuilder<
CupertinoTextFieldData> ? cupertino,
Implementation
PlatformTextField({
super.key,
this.widgetKey,
this.controller,
this.focusNode,
TextInputType? keyboardType,
this.textInputAction,
this.textCapitalization = TextCapitalization.none,
this.style,
this.textAlign,
this.autofocus,
this.obscureText,
this.autocorrect,
this.maxLines = 1,
this.maxLength,
this.onChanged,
this.onEditingComplete,
this.onSubmitted,
this.inputFormatters,
this.enabled,
this.cursorWidth,
this.cursorRadius,
this.cursorColor,
this.keyboardAppearance,
this.scrollPadding,
this.dragStartBehavior,
this.minLines,
this.expands,
this.scrollPhysics,
this.strutStyle,
this.enableInteractiveSelection,
this.scrollController,
this.onTap,
this.readOnly,
this.showCursor,
this.textAlignVertical,
this.smartDashesType,
this.smartQuotesType,
this.selectionHeightStyle,
this.selectionWidthStyle,
this.obscuringCharacter,
this.autofillHints,
this.cursorHeight,
this.restorationId,
this.maxLengthEnforcement,
this.selectionControls,
this.hintText,
this.enableIMEPersonalizedLearning,
this.makeCupertinoDecorationNull = false,
this.clipBehavior = Clip.hardEdge,
this.scribbleEnabled = true,
this.contextMenuBuilder,
this.onTapOutside,
this.spellCheckConfiguration,
this.magnifierConfiguration,
this.contentInsertionConfiguration,
this.cursorOpacityAnimates,
this.undoController,
this.material,
this.cupertino,
}) : keyboardType = keyboardType ??
(maxLines == 1 ? TextInputType.text : TextInputType.multiline);