CardCarousel constructor

const CardCarousel({
  1. Key? key,
  2. List<Widget> children = const [],
  3. int? sharpness,
  4. Color? featherColor,
})

Initializes a CardCarousel with the provided children and styling options.

This const constructor supports efficient widget tree building. The children list defines the scrollable content, while sharpness and featherColor allow per-instance overrides of theme defaults from CardCarouselTheme. The key is forwarded to the superclass for widget identification.

Parameters:

  • key: Key? (super) - Widget key for build context.
  • children: List
  • sharpness: int? (optional) - Fade sharpness override (1-12).
  • featherColor: Color? (optional) - Custom fade color.

For optimal UX, provide at least 3-5 children to enable meaningful scrolling. Integrates with ArcaneTheme for unstyled fallbacks.

Example:

CardCarousel(
  children: [
    BasicCard(
      title: Text("Card 1"),
      content: Text("First card content"),
    ),
    BasicCard(
      title: Text("Card 2"),
      content: Text("Second card content"),
    ),
    BasicCard(
      title: Text("Card 3"),
      content: Text("Third card content"),
    ),
  ],
  sharpness: 10,
  featherColor: Colors.blue.withOpacity(0.1),
)

Implementation

const CardCarousel(
    {super.key, this.children = const [], this.sharpness, this.featherColor});