Widget.textFormField constructor Null safety

const Widget.textFormField(
  1. {Key? key,
  2. String? initialValue,
  3. FormStringField? field,
  4. @Default(InputDecoration()) InputDecoration? decoration,
  5. TextInputType? keyboardType,
  6. @Default(TextCapitalization.none) TextCapitalization textCapitalization,
  7. TextInputAction? textInputAction,
  8. TextStyle? style,
  9. StrutStyle? strutStyle,
  10. TextDirection? textDirection,
  11. @Default(TextAlign.start) TextAlign textAlign,
  12. TextAlignVertical? textAlignVertical,
  13. @Default(false) bool autofocus,
  14. @Default(false) bool readOnly,
  15. bool? showCursor,
  16. @Default('•') String obscuringCharacter,
  17. @Default(false) bool obscureText,
  18. @Default(true) bool autocorrect,
  19. SmartDashesType? smartDashesType,
  20. SmartQuotesType? smartQuotesType,
  21. @Default(true) bool enableSuggestions,
  22. MaxLengthEnforcement? maxLengthEnforcement,
  23. @Default(1) int? maxLines,
  24. int? minLines,
  25. @Default(false) bool expands,
  26. int? maxLength,
  27. Callback? onTap,
  28. Map<String, String>? validatorMessages,
  29. Callback? onEditingComplete,
  30. List<TextInputFormatter>? inputFormatters,
  31. bool? enabled,
  32. @Default(2.0) double cursorWidth,
  33. double? cursorHeight,
  34. Radius? cursorRadius,
  35. Color? cursorColor,
  36. Brightness? keyboardAppearance,
  37. @Default(EdgeInsets.all(20.0)) EdgeInsets scrollPadding,
  38. bool? enableInteractiveSelection,
  39. ScrollPhysics? scrollPhysics,
  40. Iterable<String>? autofillHints,
  41. AutovalidateMode? autovalidateMode,
  42. String? restorationId,
  43. @Default(true) bool enableIMEPersonalizedLearning,
  44. MouseCursor? mouseCursor}
)

Implementation

const factory Widget.textFormField({
  Key? key,
  String? initialValue,
  FormStringField? field,
  @Default(InputDecoration()) InputDecoration? decoration,
  TextInputType? keyboardType,
  @Default(TextCapitalization.none) TextCapitalization textCapitalization,
  TextInputAction? textInputAction,
  TextStyle? style,
  StrutStyle? strutStyle,
  TextDirection? textDirection,
  @Default(TextAlign.start) TextAlign textAlign,
  TextAlignVertical? textAlignVertical,
  @Default(false) bool autofocus,
  @Default(false) bool readOnly,
  bool? showCursor,
  @Default('•') String obscuringCharacter,
  @Default(false) bool obscureText,
  @Default(true) bool autocorrect,
  SmartDashesType? smartDashesType,
  SmartQuotesType? smartQuotesType,
  @Default(true) bool enableSuggestions,
  MaxLengthEnforcement? maxLengthEnforcement,
  @Default(1) int? maxLines,
  int? minLines,
  @Default(false) bool expands,
  int? maxLength,
  Callback? onTap,
  Map<String, String>? validatorMessages,
  Callback? onEditingComplete,
  List<TextInputFormatter>? inputFormatters,
  bool? enabled,
  @Default(2.0) double cursorWidth,
  double? cursorHeight,
  Radius? cursorRadius,
  Color? cursorColor,
  Brightness? keyboardAppearance,
  @Default(EdgeInsets.all(20.0)) EdgeInsets scrollPadding,
  bool? enableInteractiveSelection,
  ScrollPhysics? scrollPhysics,
  Iterable<String>? autofillHints,
  AutovalidateMode? autovalidateMode,
  String? restorationId,
  @Default(true) bool enableIMEPersonalizedLearning,
  MouseCursor? mouseCursor,
}) = TextFormField;