FCCElevatedButton constructor

const FCCElevatedButton({
  1. Key? key,
  2. Widget? child,
  3. String? text,
  4. double? fontSize,
  5. FontWeight? fontWeight,
  6. String? fontFamily,
  7. Color? textColor,
  8. TextStyle? textStyle,
  9. TextAlign textAlign = TextAlign.center,
  10. Widget? prefix,
  11. Widget? suffix,
  12. VoidCallback? onPressed,
  13. VoidCallback? onLongPress,
  14. bool isEnabled = true,
  15. bool use3DEffect = true,
  16. bool forceSolidGradient = false,
  17. bool isLoading = false,
  18. bool enableTapEffect = true,
  19. bool hapticFeedback = true,
  20. bool isPill = false,
  21. double borderRadius = 12.0,
  22. double elevation = 6.0,
  23. double? height,
  24. double? width,
  25. Gradient? gradient,
  26. List<BoxShadow>? boxShadow,
  27. FCCGradientStyle? gradientStyle,
  28. Color? backgroundColor,
  29. Color? disabledColor,
  30. Widget? disabledChild,
  31. String? loadingText,
  32. TextStyle? loadingTextStyle,
  33. Color? loadingColor,
  34. String? tooltip,
  35. String? semanticLabel,
  36. bool excludeSemantics = false,
  37. bool bounceOnTap = true,
  38. bool rippleOnly = false,
  39. bool shimmerOnHover = false,
  40. Duration animationDuration = const Duration(milliseconds: 100),
})

Implementation

const FCCElevatedButton({
  super.key,
  this.child,
  this.text,
  this.fontSize,
  this.fontWeight,
  this.fontFamily,
  this.textColor,
  this.textStyle,
  this.textAlign = TextAlign.center,
  this.prefix,
  this.suffix,
  this.onPressed,
  this.onLongPress,
  this.isEnabled = true,
  this.use3DEffect = true,
  this.forceSolidGradient = false,
  this.isLoading = false,
  this.enableTapEffect = true,
  this.hapticFeedback = true,
  this.isPill = false,
  this.borderRadius = 12.0,
  this.elevation = 6.0,
  this.height,
  this.width,
  this.gradient,
  this.boxShadow,
  this.gradientStyle,
  this.backgroundColor,
  this.disabledColor,
  this.disabledChild,
  this.loadingText,
  this.loadingTextStyle,
  this.loadingColor,
  this.tooltip,
  this.semanticLabel,
  this.excludeSemantics = false,
  this.bounceOnTap = true,
  this.rippleOnly = false,
  this.shimmerOnHover = false,
  this.animationDuration = const Duration(milliseconds: 100),
}) : assert(child != null || text != null,
          'Either child or text must be provided');