PremiumButton constructor
const
PremiumButton({ - Key? key,
- String? label,
- Widget? child,
- IconData? leadingIcon,
- IconData? trailingIcon,
- Widget? leading,
- Widget? trailing,
- VoidCallback? onPressed,
- VoidCallback? onLongPress,
- PremiumButtonVariant variant = PremiumButtonVariant.filled,
- PremiumButtonSize size = PremiumButtonSize.md,
- bool isLoading = false,
- bool isDisabled = false,
- Color? color,
- Color? textColor,
- Gradient? gradient,
- double? borderRadius,
- bool fullWidth = false,
- double? width,
- double? height,
- EdgeInsetsGeometry? padding,
- double elevation = 0,
- bool hapticFeedback = true,
- bool isDarkMode = true,
- double pressedScale = 0.96,
- Duration animationDuration = const Duration(milliseconds: 150),
- ModernStyleOptions? styleOptions,
- String? tooltip,
})
Implementation
const PremiumButton({
super.key,
this.label,
this.child,
this.leadingIcon,
this.trailingIcon,
this.leading,
this.trailing,
this.onPressed,
this.onLongPress,
this.variant = PremiumButtonVariant.filled,
this.size = PremiumButtonSize.md,
this.isLoading = false,
this.isDisabled = false,
this.color,
this.textColor,
this.gradient,
this.borderRadius,
this.fullWidth = false,
this.width,
this.height,
this.padding,
this.elevation = 0,
this.hapticFeedback = true,
this.isDarkMode = true,
this.pressedScale = 0.96,
this.animationDuration = const Duration(milliseconds: 150),
this.styleOptions,
this.tooltip,
});