SimpleTextField constructor

const SimpleTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. FocusNode? focusNode,
  4. SimpleInputDecoration decoration = const SimpleInputDecoration(),
  5. SimpleTextFieldLabel? label,
  6. CrossAxisAlignment labelAlignment = CrossAxisAlignment.start,
  7. TextInputType? keyboardType,
  8. TextInputAction? textInputAction,
  9. TextCapitalization textCapitalization = TextCapitalization.none,
  10. TextStyle? style,
  11. StrutStyle? strutStyle,
  12. TextAlign textAlign = TextAlign.start,
  13. TextAlignVertical? textAlignVertical,
  14. TextDirection? textDirection,
  15. bool readOnly = false,
  16. ToolbarOptions? toolbarOptions,
  17. bool? showCursor,
  18. bool autofocus = false,
  19. String obscuringCharacter = '•',
  20. bool obscureText = false,
  21. bool autocorrect = false,
  22. SmartDashesType? smartDashesType,
  23. SmartQuotesType? smartQuotesType,
  24. bool enableSuggestions = true,
  25. int maxLines = 1,
  26. int? minLines,
  27. bool expands = false,
  28. int? maxLength,
  29. MaxLengthEnforcement? maxLengthEnforcement,
  30. ValueChanged<String>? onChanged,
  31. VoidCallback? onEditingComplete,
  32. ValueChanged<String>? onSubmitted,
  33. AppPrivateCommandCallback? onAppPrivateCommand,
  34. List<TextInputFormatter>? inputFormatters,
  35. bool enabled = true,
  36. double cursorWidth = 2.0,
  37. double? cursorHeight,
  38. Radius? cursorRadius,
  39. Color? cursorColor,
  40. BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
  41. BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
  42. Brightness? keyboardAppearance,
  43. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  44. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  45. bool enableInteractiveSelection = true,
  46. TextSelectionControls? selectionControls,
  47. GestureTapCallback? onTap,
  48. MouseCursor? mouseCursor,
  49. InputCounterWidgetBuilder? buildCounter,
  50. ScrollController? scrollController,
  51. ScrollPhysics? scrollPhysics,
  52. Iterable<String>? autofillHints,
  53. String? restorationId,
  54. bool enableIMEPersonalizedLearning = true,
  55. bool ignoreWhiteSpace = false,
  56. bool ignoreSpecialChar = false,
})

Implementation

const SimpleTextField({
  Key? key,
  this.controller,
  this.focusNode,
  this.decoration = const SimpleInputDecoration(),
  this.label,
  this.labelAlignment = CrossAxisAlignment.start,
  this.keyboardType,
  this.textInputAction,
  this.textCapitalization = TextCapitalization.none,
  this.style,
  this.strutStyle,
  this.textAlign = TextAlign.start,
  this.textAlignVertical,
  this.textDirection,
  this.readOnly = false,
  this.toolbarOptions,
  this.showCursor,
  this.autofocus = false,
  this.obscuringCharacter = '•',
  this.obscureText = false,
  this.autocorrect = false,
  this.smartDashesType,
  this.smartQuotesType,
  this.enableSuggestions = true,
  this.maxLines = 1,
  this.minLines,
  this.expands = false,
  this.maxLength,
  // this.maxLengthEnforced = true,
  this.maxLengthEnforcement,
  this.onChanged,
  this.onEditingComplete,
  this.onSubmitted,
  this.onAppPrivateCommand,
  this.inputFormatters,
  this.enabled = true,
  this.cursorWidth = 2.0,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor,
  this.selectionHeightStyle = ui.BoxHeightStyle.tight,
  this.selectionWidthStyle = ui.BoxWidthStyle.tight,
  this.keyboardAppearance,
  this.scrollPadding = const EdgeInsets.all(20.0),
  this.dragStartBehavior = DragStartBehavior.start,
  this.enableInteractiveSelection = true,
  this.selectionControls,
  this.onTap,
  this.mouseCursor,
  this.buildCounter,
  this.scrollController,
  this.scrollPhysics,
  this.autofillHints,
  this.restorationId,
  this.enableIMEPersonalizedLearning = true,
  this.ignoreWhiteSpace = false,
  this.ignoreSpecialChar = false,
}) : super(key: key);