GraphicsCarouselBlock constructor

const GraphicsCarouselBlock({
  1. Key? key,
  2. GraphicsCarouselBlockDevice device = GraphicsCarouselBlockDevice.auto,
  3. int pcItemsPerView = 2,
  4. double? width,
  5. double breakpoint = 600.0,
  6. double gap = 24.0,
  7. List<String>? imageUrls,
  8. List<Widget>? items,
  9. int? itemCount,
  10. IndexedWidgetBuilder? itemBuilder,
  11. ValueChanged<int>? onItemTap,
  12. Widget? biographyWidget,
  13. String title = 'Title',
  14. Widget? titleWidget,
  15. String subtitle = 'Subtitle',
  16. Widget? subtitleWidget,
  17. bool hasSubtitle = true,
  18. String? description,
  19. bool hasDescription = false,
  20. String? logoAssetPath,
  21. Widget? logoWidget,
  22. bool hasBadgeBar = true,
  23. List<String>? badgeLabels,
  24. List<Widget>? badges,
})

Implementation

const GraphicsCarouselBlock({
  super.key,
  this.device = GraphicsCarouselBlockDevice.auto,
  this.pcItemsPerView = 2,
  this.width,
  this.breakpoint = 600.0,
  this.gap = 24.0,
  this.imageUrls,
  this.items,
  this.itemCount,
  this.itemBuilder,
  this.onItemTap,
  this.biographyWidget,
  this.title = 'Title',
  this.titleWidget,
  this.subtitle = 'Subtitle',
  this.subtitleWidget,
  this.hasSubtitle = true,
  this.description,
  this.hasDescription = false,
  this.logo,
  this.logoAssetPath,
  this.logoWidget,
  this.hasLogo = true,
  this.hasBadgeBar = true,
  this.badgeLabels,
  this.badges,
})  : assert(pcItemsPerView == 2 || pcItemsPerView == 3, 'pcItemsPerView must be 2 or 3'),
      assert(
        imageUrls != null || items != null || (itemBuilder != null && itemCount != null),
        'Provide either imageUrls, items, or an itemBuilder with itemCount',
      );