TextField constructor

const TextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. int? maxLength,
  4. MaxLengthEnforcement? maxLengthEnforcement,
  5. int? maxLines = 1,
  6. int? minLines,
  7. bool filled = false,
  8. String? placeholder,
  9. bool border = true,
  10. Widget? leading,
  11. Widget? trailing,
  12. EdgeInsetsGeometry? padding,
  13. ValueChanged<String>? onSubmitted,
  14. VoidCallback? onEditingComplete,
  15. FocusNode? focusNode,
  16. VoidCallback? onTap,
  17. bool enabled = true,
  18. bool readOnly = false,
  19. bool obscureText = false,
  20. String obscuringCharacter = '•',
  21. String? initialValue,
  22. BorderRadiusGeometry? borderRadius,
  23. TextInputType? keyboardType,
  24. TextAlign textAlign = TextAlign.start,
  25. bool expands = false,
  26. TextAlignVertical? textAlignVertical = TextAlignVertical.center,
  27. Iterable<String>? autofillHints,
  28. UndoHistoryController? undoController,
  29. ValueChanged<String>? onChanged,
  30. void onTapOutside(
    1. PointerDownEvent event
    )?,
  31. List<TextInputFormatter>? inputFormatters,
  32. TextStyle? style,
  33. EditableTextContextMenuBuilder? contextMenuBuilder = _defaultContextMenuBuilder,
  34. bool useNativeContextMenu = false,
  35. bool? isCollapsed,
  36. TextInputAction? textInputAction,
  37. Clip clipBehavior = Clip.hardEdge,
  38. bool autofocus = false,
  39. AlignmentGeometry placeholderAlignment = AlignmentDirectional.centerStart,
})

Implementation

const TextField({
  super.key,
  this.controller,
  this.maxLength,
  this.maxLengthEnforcement,
  this.maxLines = 1,
  this.minLines,
  this.filled = false,
  this.placeholder,
  this.border = true,
  this.leading,
  this.trailing,
  this.padding,
  this.onSubmitted,
  this.onEditingComplete,
  this.focusNode,
  this.onTap,
  this.enabled = true,
  this.readOnly = false,
  this.obscureText = false,
  this.obscuringCharacter = '•',
  this.initialValue,
  this.borderRadius,
  this.keyboardType,
  this.textAlign = TextAlign.start,
  this.expands = false,
  this.textAlignVertical = TextAlignVertical.center,
  this.autofillHints,
  this.undoController,
  this.onChanged,
  this.onTapOutside,
  this.inputFormatters,
  this.style,
  this.contextMenuBuilder = _defaultContextMenuBuilder,
  this.useNativeContextMenu = false,
  this.isCollapsed,
  this.textInputAction,
  this.clipBehavior = Clip.hardEdge,
  this.autofocus = false,
  this.placeholderAlignment = AlignmentDirectional.centerStart,
});