PlatformTextFormField constructor
const
PlatformTextFormField({
- Key? key,
- Key? widgetKey,
- TextEditingController? controller,
- String? initialValue,
- FocusNode? focusNode,
- TextInputType? keyboardType,
- TextCapitalization? textCapitalization = TextCapitalization.none,
- TextInputAction? textInputAction,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextAlignVertical? textAlignVertical,
- bool? autofocus,
- bool? readOnly,
- bool? showCursor,
- String? obscuringCharacter,
- bool? obscureText,
- bool? autocorrect,
- SmartDashesType? smartDashesType,
- SmartQuotesType? smartQuotesType,
- bool? enableSuggestions,
- int? maxLines = 1,
- int? minLines,
- bool? expands,
- int? maxLength,
- ValueChanged<
String> ? onChanged, - GestureTapCallback? onTap,
- VoidCallback? onEditingComplete,
- ValueChanged<
String> ? onFieldSubmitted, - FormFieldSetter<
String> ? onSaved, - FormFieldValidator<
String> ? validator, - List<
TextInputFormatter> ? inputFormatters, - bool? enabled,
- double? cursorWidth,
- double? cursorHeight,
- Color? cursorColor,
- Brightness? keyboardAppearance,
- EdgeInsets? scrollPadding,
- bool? enableInteractiveSelection,
- TextSelectionControls? selectionControls,
- ScrollPhysics? scrollPhysics,
- Iterable<
String> ? autofillHints, - AutovalidateMode? autovalidateMode,
- EditableTextContextMenuBuilder? contextMenuBuilder,
- String? hintText,
- PlatformBuilder<
MaterialTextFormFieldData> ? material, - PlatformBuilder<
CupertinoTextFormFieldData> ? cupertino,
Implementation
const PlatformTextFormField({
super.key,
this.widgetKey,
this.controller,
this.initialValue,
this.focusNode,
TextInputType? keyboardType,
this.textCapitalization = TextCapitalization.none,
this.textInputAction,
this.style,
this.strutStyle,
this.textAlign,
this.textAlignVertical,
this.autofocus,
this.readOnly,
this.showCursor,
this.obscuringCharacter,
this.obscureText,
this.autocorrect,
this.smartDashesType,
this.smartQuotesType,
this.enableSuggestions,
this.maxLines = 1,
this.minLines,
this.expands,
this.maxLength,
this.onChanged,
this.onTap,
this.onEditingComplete,
this.onFieldSubmitted,
this.onSaved,
this.validator,
this.inputFormatters,
this.enabled,
this.cursorWidth,
this.cursorHeight,
this.cursorColor,
this.keyboardAppearance,
this.scrollPadding,
this.enableInteractiveSelection,
this.selectionControls,
this.scrollPhysics,
this.autofillHints,
this.autovalidateMode,
this.contextMenuBuilder,
this.hintText,
this.material,
this.cupertino,
}) : keyboardType = keyboardType ??
(maxLines == 1 ? TextInputType.text : TextInputType.multiline);