SButton constructor

const SButton({
  1. Key? key,
  2. required Widget child,
  3. Color? splashColor,
  4. AlignmentGeometry? alignment,
  5. bool ignoreChildWidgetOnTap = false,
  6. bool isCircleButton = false,
  7. bool shouldBounce = true,
  8. double bounceScale = 0.98,
  9. BubbleLabelContent? bubbleLabelContent,
  10. Color? selectedColor,
  11. void onDoubleTap(
    1. Offset onTapPosition
    )?,
  12. void onTap(
    1. Offset onTapPosition
    )?,
  13. double? splashOpacity,
  14. void onLongPressStart(
    1. LongPressStartDetails
    )?,
  15. void onLongPressEnd(
    1. LongPressEndDetails
    )?,
  16. Duration? delay,
  17. HitTestBehavior hitTestBehavior = HitTestBehavior.opaque,
  18. bool enableHapticFeedback = true,
  19. HapticFeedbackType hapticFeedbackType = HapticFeedbackType.lightImpact,
  20. bool isLoading = false,
  21. Widget? loadingWidget,
  22. dynamic onError(
    1. Object error
    )?,
  23. Widget errorBuilder(
    1. BuildContext context,
    2. Object error
    )?,
  24. bool isActive = true,
  25. BorderRadius? borderRadius,
  26. String? tooltipMessage,
  27. bool disableOpacityChange = false,
  28. double? opacityWhenDisabled = 0.3,
  29. void onTappedWhenDisabled(
    1. Offset
    )?,
})

Implementation

const SButton({
  super.key,
  required this.child,
  this.splashColor,
  this.alignment,
  this.ignoreChildWidgetOnTap = false,
  this.isCircleButton = false,
  this.shouldBounce = true,
  this.bounceScale = 0.98,
  this.bubbleLabelContent,
  this.selectedColor,
  this.onDoubleTap,
  this.onTap,
  this.splashOpacity,
  this.onLongPressStart,
  this.onLongPressEnd,
  this.delay,
  this.hitTestBehavior = HitTestBehavior.opaque,
  this.enableHapticFeedback = true,
  this.hapticFeedbackType = HapticFeedbackType.lightImpact,
  this.isLoading = false,
  this.loadingWidget,
  this.onError,
  this.errorBuilder,
  this.isActive = true,
  this.borderRadius,
  this.tooltipMessage,
  this.disableOpacityChange = false,
  this.opacityWhenDisabled = 0.3,
  this.onTappedWhenDisabled,
});