GraphicsCarouselBlock constructor
const
GraphicsCarouselBlock({
- Key? key,
- GraphicsCarouselBlockDevice device = GraphicsCarouselBlockDevice.auto,
- int pcItemsPerView = 2,
- double? width,
- double breakpoint = 600.0,
- double gap = 24.0,
- List<
String> ? imageUrls, - List<
Widget> ? items, - int? itemCount,
- IndexedWidgetBuilder? itemBuilder,
- ValueChanged<
int> ? onItemTap, - Widget? biographyWidget,
- String title = 'Title',
- Widget? titleWidget,
- String subtitle = 'Subtitle',
- Widget? subtitleWidget,
- bool hasSubtitle = true,
- String? description,
- bool hasDescription = false,
- ImageProvider<
Object> ? logo, - String? logoAssetPath,
- Widget? logoWidget,
- bool hasLogo = true,
- bool hasBadgeBar = true,
- List<
String> ? badgeLabels, - List<
Widget> ? badges,
Creates a GraphicsCarouselBlock.
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',
);