consumeMaxWeight property

bool consumeMaxWeight
final

Whether the collapsed items are allowed to expand to the max size.

If this is false, the layout of the carousel doesn't change. This is especially useful when a weight list in CarouselView.weighted has a max item in the middle and at least one small item on either side, such as [1, 7, 1, 1]. In this case, if this is false, the first and the last two items cannot expand to the max size. If this is true, there will be some space before the first item or after the last item coming so every item has a chance to be fully expanded.

Defaults to true.

Implementation

final bool consumeMaxWeight;