GTFGridItem constructor

GTFGridItem({
  1. Key? key,
  2. VoidCallback? onTap,
  3. Color? backgroundColor = GTFColor.white,
  4. String? image = '',
  5. required String title,
  6. String subTitle = '',
  7. int badgeNumber = 0,
  8. bool showRedDot = false,
  9. String cornerMaskImage = '',
  10. double radius = 0,
  11. double badgeHeight = 18,
  12. double redDotHeight = 12,
  13. Color badgeColor = GTFColor.red,
  14. Color badgeTextColor = GTFColor.white,
  15. double badgeTextFontSize = 12,
  16. double badgeBorderWidth = 1,
  17. GTFBadgeMaxStyle badgeMaxStyle = GTFBadgeMaxStyle.number,
  18. GTFBadgePosition? badgePosition,
  19. GTFGridContentMainAlignment contentMainAlignment = GTFGridContentMainAlignment.center,
  20. GTFGridContentCrossAlignment contentCrossAlignment = GTFGridContentCrossAlignment.center,
  21. GTFGridImagePosition imagePosition = GTFGridImagePosition.left,
  22. double? imageTitleSpacing = 0,
  23. GTFGridAlignment? alignment = GTFGridAlignment.center,
  24. EdgeInsets? margin = const EdgeInsets.all(12),
  25. double titleFontSize = 13,
  26. double subTitleFontSize = 12,
  27. Color titleColor = GTFColor.grey6,
  28. Color subTitleColor = GTFColor.grey4,
  29. FontWeight titleFontWeight = FontWeight.normal,
  30. FontWeight subTitleFontWeight = FontWeight.normal,
  31. double titleHeight = 1.38,
  32. double subTitleHeight = 1.38,
  33. double imageWidth = 37,
  34. double imageHeight = 37,
})

Implementation

GTFGridItem({
  Key? key,
  this.onTap,
  this.backgroundColor = GTFColor.white,
  this.image = '',
  required this.title,
  this.subTitle = '',
  this.badgeNumber = 0,
  this.showRedDot = false,
  this.cornerMaskImage = '',
  this.radius = 0,
  this.badgeHeight = 18,
  this.redDotHeight = 12,
  this.badgeColor = GTFColor.red,
  this.badgeTextColor = GTFColor.white,
  this.badgeTextFontSize = 12,
  this.badgeBorderWidth = 1,
  this.badgeMaxStyle = GTFBadgeMaxStyle.number,
  this.badgePosition,
  this.contentMainAlignment = GTFGridContentMainAlignment.center,
  this.contentCrossAlignment = GTFGridContentCrossAlignment.center,
  this.imagePosition = GTFGridImagePosition.left,
  this.imageTitleSpacing = 0,
  this.alignment = GTFGridAlignment.center,
  this.margin = const EdgeInsets.all(12),
  this.titleFontSize = 13,
  this.subTitleFontSize = 12,
  this.titleColor = GTFColor.grey6,
  this.subTitleColor = GTFColor.grey4,
  this.titleFontWeight = FontWeight.normal,
  this.subTitleFontWeight = FontWeight.normal,
  this.titleHeight = 1.38,
  this.subTitleHeight = 1.38,
  this.imageWidth = 37,
  this.imageHeight = 37,
}) : super(key: key) {
  if (badgeNumber > 0 && showRedDot) {
    throw ArgumentError('only badgeNumber or showRedDot');
  }
}