BaseTextField constructor

const BaseTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. FocusNode? focusNode,
  4. TextInputType? keyboardType,
  5. TextInputAction? textInputAction,
  6. TextCapitalization textCapitalization = TextCapitalization.none,
  7. TextStyle? style,
  8. StrutStyle? strutStyle,
  9. TextAlign textAlign = TextAlign.start,
  10. TextAlignVertical? textAlignVertical,
  11. bool readOnly = false,
  12. bool? showCursor,
  13. ToolbarOptions? toolbarOptions,
  14. bool autofocus = false,
  15. String obscuringCharacter = '•',
  16. bool obscureText = false,
  17. bool autocorrect = true,
  18. SmartDashesType? smartDashesType,
  19. SmartQuotesType? smartQuotesType,
  20. bool enableSuggestions = true,
  21. int maxLines = 1,
  22. int? minLines,
  23. bool expands = false,
  24. int? maxLength,
  25. ValueChanged<String>? onChanged,
  26. VoidCallback? onEditingComplete,
  27. ValueChanged<String>? onSubmitted,
  28. List<TextInputFormatter>? inputFormatters,
  29. bool? enabled,
  30. double cursorWidth = 2.0,
  31. double? cursorHeight,
  32. Radius cursorRadius = const Radius.circular(2.0),
  33. Color? cursorColor,
  34. BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
  35. BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
  36. Brightness? keyboardAppearance,
  37. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  38. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  39. bool enableInteractiveSelection = true,
  40. ScrollController? scrollController,
  41. ScrollPhysics? scrollPhysics,
  42. Iterable<String>? autofillHints,
  43. String? restorationId,
  44. MaxLengthEnforcement? maxLengthEnforcement,
  45. GestureTapCallback? onTap,
  46. BoxDecoration cupertinoDecoration = _kDefaultRoundedBorderDecoration,
  47. EdgeInsetsGeometry padding = const EdgeInsets.all(6.0),
  48. String? placeholder,
  49. TextStyle placeholderStyle = const TextStyle(fontWeight: FontWeight.w400, color: CupertinoColors.placeholderText),
  50. Widget? prefix,
  51. OverlayVisibilityMode prefixMode = OverlayVisibilityMode.always,
  52. Widget? suffix,
  53. OverlayVisibilityMode suffixMode = OverlayVisibilityMode.always,
  54. OverlayVisibilityMode clearButtonMode = OverlayVisibilityMode.never,
  55. InputDecoration materialDecoration = const InputDecoration(),
  56. TextDirection? textDirection,
  57. InputCounterWidgetBuilder? buildCounter,
  58. MouseCursor? mouseCursor,
  59. TextSelectionControls? selectionControls,
  60. AppPrivateCommandCallback? onAppPrivateCommand,
  61. BaseParam? baseParam,
})

Implementation

const BaseTextField({
  Key? key,
  this.controller,
  this.focusNode,
  this.keyboardType,
  this.textInputAction,
  this.textCapitalization = TextCapitalization.none,
  this.style,
  this.strutStyle,
  this.textAlign = TextAlign.start,
  this.textAlignVertical,
  this.readOnly = false,
  this.showCursor,
  this.toolbarOptions,
  this.autofocus = false,
  this.obscuringCharacter = '•',
  this.obscureText = false,
  this.autocorrect = true,
  this.smartDashesType,
  this.smartQuotesType,
  this.enableSuggestions = true,
  this.maxLines = 1,
  this.minLines,
  this.expands = false,
  this.maxLength,
  this.onChanged,
  this.onEditingComplete,
  this.onSubmitted,
  this.inputFormatters,
  this.enabled,
  this.cursorWidth = 2.0,
  this.cursorHeight,
  this.cursorRadius = const Radius.circular(2.0),
  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.scrollController,
  this.scrollPhysics,
  this.autofillHints,
  this.restorationId,
  this.maxLengthEnforcement,
  this.onTap,
  // cupertino
  this.cupertinoDecoration = _kDefaultRoundedBorderDecoration,
  this.padding = const EdgeInsets.all(6.0),
  this.placeholder,
  this.placeholderStyle = const TextStyle(
    fontWeight: FontWeight.w400,
    color: CupertinoColors.placeholderText,
  ),
  this.prefix,
  this.prefixMode = OverlayVisibilityMode.always,
  this.suffix,
  this.suffixMode = OverlayVisibilityMode.always,
  this.clearButtonMode = OverlayVisibilityMode.never,
  // material
  this.materialDecoration = const InputDecoration(),
  this.textDirection,
  this.buildCounter,
  this.mouseCursor,
  this.selectionControls,
  this.onAppPrivateCommand,
  BaseParam? baseParam,
}) : super(key: key, baseParam: baseParam);