UButton constructor
const
UButton({
- String? title,
- Key? key,
- UButtonType type = UButtonType.elevated,
- VoidCallback? onTap,
- VoidCallback? onLongPress,
- Widget? icon,
- UButtonIconPosition iconPosition = UButtonIconPosition.leading,
- double? width,
- double? height,
- double? minWidth,
- double? maxWidth,
- double? minHeight,
- double? maxHeight,
- TextStyle? textStyle,
- Color? backgroundColor,
- Gradient? gradient,
- Color? foregroundColor,
- double borderRadius = 8,
- double borderWidth = 1,
- Color? borderColor,
- EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 16),
- double elevation = 2,
- bool isLoading = false,
- bool enabled = true,
- String? tooltip,
- int? counter,
- String? counterDescription = "",
- dynamic counterOnCounting()?,
- bool? counterResetCounterOnTap,
- 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,
});