CardImage constructor

const CardImage({
  1. Key? key,
  2. required dynamic image,
  3. ImagePosition position = ImagePosition.top,
  4. ImageRatio ratio = ImageRatio.half,
  5. double? customWidth,
  6. double? customHeight,
  7. double? imageBorderRadius,
  8. BorderRadiusGeometry? customImageBorderRadius,
  9. BoxFit fit = BoxFit.cover,
  10. bool showLikeIcon = false,
  11. OverlayPosition likeIconPosition = OverlayPosition.topRight,
  12. IconData likeIcon = Icons.favorite,
  13. Color? likeIconColor,
  14. double likeIconSize = 24.0,
  15. bool isLiked = false,
  16. VoidCallback? onLikeTap,
  17. bool showBookmarkIcon = false,
  18. OverlayPosition bookmarkIconPosition = OverlayPosition.topLeft,
  19. IconData bookmarkIcon = Icons.bookmark,
  20. Color? bookmarkIconColor,
  21. double bookmarkIconSize = 24.0,
  22. bool isBookmarked = false,
  23. VoidCallback? onBookmarkTap,
  24. List<StatusChip>? statusChips,
})

Implementation

const CardImage({
  Key? key,
  required this.image,
  this.position = ImagePosition.top,
  this.ratio = ImageRatio.half,
  this.customWidth,
  this.customHeight,
  this.imageBorderRadius,
  this.customImageBorderRadius,
  this.fit = BoxFit.cover,

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

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

  this.statusChips,
}) : super(key: key);