PremiumButton constructor

const PremiumButton({
  1. Key? key,
  2. String? label,
  3. Widget? child,
  4. IconData? leadingIcon,
  5. IconData? trailingIcon,
  6. Widget? leading,
  7. Widget? trailing,
  8. VoidCallback? onPressed,
  9. VoidCallback? onLongPress,
  10. PremiumButtonVariant variant = PremiumButtonVariant.filled,
  11. PremiumButtonSize size = PremiumButtonSize.md,
  12. bool isLoading = false,
  13. bool isDisabled = false,
  14. Color? color,
  15. Color? textColor,
  16. Gradient? gradient,
  17. double? borderRadius,
  18. bool fullWidth = false,
  19. double? width,
  20. double? height,
  21. EdgeInsetsGeometry? padding,
  22. double elevation = 0,
  23. bool hapticFeedback = true,
  24. bool isDarkMode = true,
  25. double pressedScale = 0.96,
  26. Duration animationDuration = const Duration(milliseconds: 150),
  27. ModernStyleOptions? styleOptions,
  28. 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,
});