XButton constructor

const XButton({
  1. Key? key,
  2. required Function onPressed,
  3. VoidCallback? onLongPress,
  4. ValueChanged<bool>? onHover,
  5. ValueChanged<bool>? onFocusChange,
  6. String? label,
  7. double? radius,
  8. XButtonStyle? style,
  9. ButtonStyle? elevatedButtonStyle,
  10. FocusNode? focusNode,
  11. bool autofocus = false,
  12. Clip? clipBehavior,
  13. WidgetStatesController? statesController,
  14. TextStyle? textStyle,
  15. XButtonState? state,
  16. bool isLoading = false,
  17. bool isLoadingInside = false,
  18. String? loadingLabel,
  19. String successLabel = 'Success',
  20. String errorLabel = 'Try again',
  21. Widget? loadingChild,
  22. Widget? successChild,
  23. Widget? errorChild,
  24. Widget? loadingIndicator,
  25. Widget successIcon = const Icon(Icons.check),
  26. Widget errorIcon = const Icon(Icons.refresh),
  27. Duration stateTransitionDuration = const Duration(milliseconds: 200),
  28. bool isEnable = true,
  29. bool? isForceTap = false,
  30. Widget? child,
  31. double? width,
  32. double? height,
  33. bool widthInfinity = false,
  34. XLook look = XLook.standard,
})

Implementation

const XButton({
  super.key,
  required this.onPressed,
  this.onLongPress,
  this.onHover,
  this.onFocusChange,
  this.label,
  this.radius,
  this.style,
  this.elevatedButtonStyle,
  this.focusNode,
  this.autofocus = false,
  this.clipBehavior,
  this.statesController,
  this.textStyle,
  this.state,
  this.isLoading = false,
  this.isLoadingInside = false,
  this.loadingLabel,
  this.successLabel = 'Success',
  this.errorLabel = 'Try again',
  this.loadingChild,
  this.successChild,
  this.errorChild,
  this.loadingIndicator,
  this.successIcon = const Icon(Icons.check),
  this.errorIcon = const Icon(Icons.refresh),
  this.stateTransitionDuration = const Duration(milliseconds: 200),
  this.isEnable = true,
  this.isForceTap = false,
  this.child,
  this.width,
  this.height,
  this.widthInfinity = false,
  this.look = XLook.standard,
});