PlatformTextFormField constructor

const PlatformTextFormField({
  1. Key? key,
  2. Key? widgetKey,
  3. TextEditingController? controller,
  4. String? initialValue,
  5. FocusNode? focusNode,
  6. TextInputType? keyboardType,
  7. TextCapitalization? textCapitalization = TextCapitalization.none,
  8. TextInputAction? textInputAction,
  9. TextStyle? style,
  10. StrutStyle? strutStyle,
  11. TextAlign? textAlign,
  12. TextAlignVertical? textAlignVertical,
  13. bool? autofocus,
  14. bool? readOnly,
  15. bool? showCursor,
  16. String? obscuringCharacter,
  17. bool? obscureText,
  18. bool? autocorrect,
  19. SmartDashesType? smartDashesType,
  20. SmartQuotesType? smartQuotesType,
  21. bool? enableSuggestions,
  22. int? maxLines = 1,
  23. int? minLines,
  24. bool? expands,
  25. int? maxLength,
  26. ValueChanged<String>? onChanged,
  27. GestureTapCallback? onTap,
  28. VoidCallback? onEditingComplete,
  29. ValueChanged<String>? onFieldSubmitted,
  30. FormFieldSetter<String>? onSaved,
  31. FormFieldValidator<String>? validator,
  32. List<TextInputFormatter>? inputFormatters,
  33. bool? enabled,
  34. double? cursorWidth,
  35. double? cursorHeight,
  36. Color? cursorColor,
  37. Brightness? keyboardAppearance,
  38. EdgeInsets? scrollPadding,
  39. bool? enableInteractiveSelection,
  40. TextSelectionControls? selectionControls,
  41. ScrollPhysics? scrollPhysics,
  42. Iterable<String>? autofillHints,
  43. AutovalidateMode? autovalidateMode,
  44. EditableTextContextMenuBuilder? contextMenuBuilder,
  45. String? hintText,
  46. PlatformBuilder<MaterialTextFormFieldData>? material,
  47. 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);