UButton constructor

const UButton({
  1. String? title,
  2. Key? key,
  3. UButtonType type = UButtonType.elevated,
  4. VoidCallback? onTap,
  5. VoidCallback? onLongPress,
  6. Widget? icon,
  7. UButtonIconPosition iconPosition = UButtonIconPosition.leading,
  8. double? width,
  9. double? height,
  10. double? minWidth,
  11. double? maxWidth,
  12. double? minHeight,
  13. double? maxHeight,
  14. TextStyle? textStyle,
  15. Color? backgroundColor,
  16. Gradient? gradient,
  17. Color? foregroundColor,
  18. double borderRadius = 8,
  19. double borderWidth = 1,
  20. Color? borderColor,
  21. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 16),
  22. double elevation = 2,
  23. bool isLoading = false,
  24. bool enabled = true,
  25. String? tooltip,
  26. int? counter,
  27. String? counterDescription = "",
  28. dynamic counterOnCounting(
    1. int
    )?,
  29. bool? counterResetCounterOnTap,
  30. String? heroTag,
})

Implementation

const UButton({
  this.title,
  super.key,
  this.type = UButtonType.elevated,
  this.onTap,
  this.onLongPress,
  this.icon,
  this.iconPosition = UButtonIconPosition.leading,
  this.width,
  this.height,
  this.minWidth,
  this.maxWidth,
  this.minHeight,
  this.maxHeight,
  this.textStyle,
  this.backgroundColor,
  this.gradient,
  this.foregroundColor,
  this.borderRadius = 8,
  this.borderWidth = 1,
  this.borderColor,
  this.padding = const EdgeInsets.symmetric(horizontal: 16),
  this.elevation = 2,
  this.isLoading = false,
  this.enabled = true,
  this.tooltip,
  this.counter,
  this.counterDescription = "",
  this.counterOnCounting,
  this.counterResetCounterOnTap,
  this.heroTag,
});