AdvancedCard constructor

const AdvancedCard({
  1. Key? key,
  2. double? width,
  3. double? height,
  4. bool fullWidth = false,
  5. bool fullHeight = false,
  6. Color? backgroundColor,
  7. double? borderRadius,
  8. BorderRadiusGeometry? customBorderRadius,
  9. EdgeInsetsGeometry? padding,
  10. EdgeInsetsGeometry? margin,
  11. double? borderWidth,
  12. Color? borderColor,
  13. bool hasShadow = true,
  14. Color? shadowColor,
  15. double? shadowBlur,
  16. double? shadowSpread,
  17. Offset? shadowOffSet,
  18. List<BoxShadow>? customShadows,
  19. VoidCallback? onTap,
  20. VoidCallback? onLongPress,
  21. bool enableHover = true,
  22. dynamic cardImage,
  23. ImagePosition imagePosition = ImagePosition.top,
  24. ImageRatio imageRatio = ImageRatio.half,
  25. double? customImageWidth,
  26. double? customImageHeight,
  27. double? imageBorderRadius,
  28. BoxFit imageFit = BoxFit.cover,
  29. bool showLikeIcon = false,
  30. OverlayPosition likeIconPosition = OverlayPosition.topRight,
  31. IconData likeIcon = Icons.favorite,
  32. Color? likeIconColor,
  33. double likeIconSize = 24.0,
  34. bool isLiked = false,
  35. VoidCallback? onLikeTap,
  36. bool showBookmarkIcon = false,
  37. OverlayPosition bookmarkIconPosition = OverlayPosition.topLeft,
  38. IconData bookmarkIcon = Icons.bookmark,
  39. Color? bookmarkIconColor,
  40. double bookmarkIconSize = 24.0,
  41. bool isBookmarked = false,
  42. VoidCallback? onBookmarkTap,
  43. List<StatusChip>? statusChips,
  44. String? title,
  45. double? titleFontSize,
  46. FontWeight? titleFontWeight,
  47. Color? titleColor,
  48. String? titleFontFamily,
  49. ContentAlignment titleAlignment = ContentAlignment.left,
  50. int? titleMaxLines,
  51. TextOverflow? titleOverflow,
  52. String? description,
  53. double? descriptionFontSize,
  54. FontWeight? descriptionFontWeight,
  55. Color? descriptionColor,
  56. String? descriptionFontFamily,
  57. ContentAlignment descriptionAlignment = ContentAlignment.left,
  58. int? descriptionMaxLines,
  59. TextOverflow? descriptionOverflow,
  60. double? rating,
  61. int maxRating = 5,
  62. double ratingStarSize = 16.0,
  63. Color? ratingFilledColor,
  64. Color? ratingEmptyColor,
  65. bool showRatingNumber = true,
  66. String? customRatingText,
  67. ValueChanged<double>? onRatingChanged,
  68. List<String>? chips,
  69. ContentChipPosition chipPosition = ContentChipPosition.afterTitle,
  70. Color? chipBackgroundColor,
  71. Color? chipTextColor,
  72. double? chipFontSize,
  73. FontWeight? chipFontWeight,
  74. double? chipBorderRadius,
  75. VoidCallback? onChipTap,
  76. List<ContentChip>? customChips,
  77. List<MetricItem>? metrics,
  78. int metricsColumns = 3,
  79. double metricsSpacing = 16.0,
  80. bool showMetricsDividers = false,
  81. Color? metricsBackgroundColor,
  82. List<IconTextPair>? iconTextPairs,
  83. String? price,
  84. double? priceFontSize,
  85. FontWeight? priceFontWeight,
  86. Color? priceColor,
  87. ContentAlignment priceAlignment = ContentAlignment.left,
  88. double contentSpacing = 8.0,
  89. String? buttonText,
  90. IconData? buttonIcon,
  91. bool buttonIconOnRight = false,
  92. CardButtonStyle buttonStyle = CardButtonStyle.elevated,
  93. ButtonPosition buttonPosition = ButtonPosition.fullWidth,
  94. Color? buttonBackgroundColor,
  95. Color? buttonTextColor,
  96. Color? buttonBorderColor,
  97. double buttonBorderWidth = 1.5,
  98. double? buttonFontSize,
  99. FontWeight? buttonFontWeight,
  100. EdgeInsetsGeometry? buttonPadding,
  101. double? buttonBorderRadius,
  102. double? buttonWidth,
  103. double? buttonHeight,
  104. double buttonIconSize = 20.0,
  105. double buttonIconTextSpacing = 8.0,
  106. double buttonElevation = 2.0,
  107. Color? buttonHoverColor,
  108. bool buttonIsLoading = false,
  109. bool buttonIsDisabled = false,
  110. VoidCallback? onButtonPressed,
  111. CardButton? secondaryButton,
  112. List<CardButton>? buttons,
  113. double buttonSpacing = 12.0,
  114. Axis buttonDirection = Axis.horizontal,
  115. MainAxisAlignment buttonAlignment = MainAxisAlignment.center,
  116. Widget? child,
})

Implementation

const AdvancedCard({
    super.key,

    this.width,
    this.height,
    this.fullWidth = false,
    this.fullHeight = false,
    this.backgroundColor,
    this.borderRadius,
    this.customBorderRadius,
    this.padding,
    this.margin,

    this.borderWidth,
    this.borderColor,

    this.hasShadow = true,
    this.shadowColor,
    this.shadowBlur,
    this.shadowSpread,
    this.shadowOffSet,
    this.customShadows,

    this.onTap,
    this.onLongPress,
    this.enableHover = true,

    this.cardImage,
    this.imagePosition = ImagePosition.top,
    this.imageRatio = ImageRatio.half,
    this.customImageWidth,
    this.customImageHeight,
    this.imageBorderRadius,
    this.imageFit = BoxFit.cover,

    this.showLikeIcon = false,
    this.likeIconPosition = OverlayPosition.topRight,
    this.likeIcon = Icons.favorite,
    this.likeIconColor,
    this.likeIconSize = 24.0,
    this.isLiked = false,
    this.onLikeTap,

    this.showBookmarkIcon = false,
    this.bookmarkIconPosition = OverlayPosition.topLeft,
    this.bookmarkIcon = Icons.bookmark,
    this.bookmarkIconColor,
    this.bookmarkIconSize = 24.0,
    this.isBookmarked = false,
    this.onBookmarkTap,

    this.statusChips,

    this.title,
    this.titleFontSize,
    this.titleFontWeight,
    this.titleColor,
    this.titleFontFamily,
    this.titleAlignment = ContentAlignment.left,
    this.titleMaxLines,
    this.titleOverflow,

    this.description,
    this.descriptionFontSize,
    this.descriptionFontWeight,
    this.descriptionColor,
    this.descriptionFontFamily,
    this.descriptionAlignment = ContentAlignment.left,
    this.descriptionMaxLines,
    this.descriptionOverflow,

    this.rating,
    this.maxRating = 5,
    this.ratingStarSize = 16.0,
    this.ratingFilledColor,
    this.ratingEmptyColor,
    this.showRatingNumber = true,
    this.customRatingText,
    this.onRatingChanged,

    this.chips,
    this.chipPosition = ContentChipPosition.afterTitle,
    this.chipBackgroundColor,
    this.chipTextColor,
    this.chipFontSize,
    this.chipFontWeight,
    this.chipBorderRadius,
    this.onChipTap,
    this.customChips,

    this.metrics,
    this.metricsColumns = 3,
    this.metricsSpacing = 16.0,
    this.showMetricsDividers = false,
    this.metricsBackgroundColor,

    this.iconTextPairs,

    this.price,
    this.priceFontSize,
    this.priceFontWeight,
    this.priceColor,
    this.priceAlignment = ContentAlignment.left,

    this.contentSpacing = 8.0,

    this.buttonText,
    this.buttonIcon,
    this.buttonIconOnRight = false,
    this.buttonStyle = CardButtonStyle.elevated,
    this.buttonPosition = ButtonPosition.fullWidth,
    this.buttonBackgroundColor,
    this.buttonTextColor,
    this.buttonBorderColor,
    this.buttonBorderWidth = 1.5,
    this.buttonFontSize,
    this.buttonFontWeight,
    this.buttonPadding,
    this.buttonBorderRadius,
    this.buttonWidth,
    this.buttonHeight,
    this.buttonIconSize = 20.0,
    this.buttonIconTextSpacing = 8.0,
    this.buttonElevation = 2.0,
    this.buttonHoverColor,
    this.buttonIsLoading = false,
    this.buttonIsDisabled = false,
    this.onButtonPressed,
    this.secondaryButton,
    this.buttons,
    this.buttonSpacing = 12.0,
    this.buttonDirection = Axis.horizontal,
    this.buttonAlignment = MainAxisAlignment.center,

    this.child
});