ClearButton constructor

const ClearButton(
  1. TextEditingController _controller, {
  2. Widget icon = defaultIcon,
  3. VoidCallback? onPressed,
  4. double? iconSize,
  5. VisualDensity? visualDensity,
  6. EdgeInsetsGeometry? padding,
  7. AlignmentGeometry? alignment,
  8. double? splashRadius,
  9. Color? color,
  10. Color? focusColor,
  11. Color? hoverColor,
  12. Color? highlightColor,
  13. Color? splashColor,
  14. Color? disabledColor,
  15. ValueChanged<bool>? onHover,
  16. VoidCallback? onLongPress,
  17. MouseCursor? mouseCursor,
  18. FocusNode? focusNode,
  19. bool autofocus = false,
  20. String? tooltip,
  21. bool? enableFeedback,
  22. BoxConstraints? constraints,
  23. ButtonStyle? style,
  24. bool? isSelected,
  25. Widget? selectedIcon,
  26. Key? key,
  27. Widget whenEmptyChild = UiConstants.placeholder,
  28. Curve firstCurve = UiConstants.switchOutCurve,
  29. Curve secondCurve = UiConstants.switchInCurve,
  30. Curve sizeCurve = UiConstants.switchOutCurve,
  31. Duration duration = UiConstants.duration,
  32. AnimatedCrossFadeBuilder layoutBuilder = AnimatedCrossFade.defaultLayoutBuilder,
  33. bool excludeBottomFocus = true,
  34. Duration? reverseDuration,
})

Constructor for the ClearButton class.

  • TextEditingController is the text editing controller to listen to.
  • icon is the icon to display in the button.
  • key is the optional key to use for the widget.

Implementation

const ClearButton(
  this._controller, {
  super.icon = defaultIcon,
  super.onPressed,
  super.iconSize,
  super.visualDensity,
  super.padding,
  super.alignment,
  super.splashRadius,
  super.color,
  super.focusColor,
  super.hoverColor,
  super.highlightColor,
  super.splashColor,
  super.disabledColor,
  super.onHover,
  super.onLongPress,
  super.mouseCursor,
  super.focusNode,
  super.autofocus,
  super.tooltip,
  super.enableFeedback,
  super.constraints,
  super.style,
  super.isSelected,
  super.selectedIcon,
  super.key,
  this.whenEmptyChild = UiConstants.placeholder,
  this.firstCurve = UiConstants.switchOutCurve,
  this.secondCurve = UiConstants.switchInCurve,
  this.sizeCurve = UiConstants.switchOutCurve,
  this.duration = UiConstants.duration,
  this.layoutBuilder = AnimatedCrossFade.defaultLayoutBuilder,
  this.excludeBottomFocus = true,
  this.reverseDuration,
});