flexWeights property

List<int>? flexWeights
final

The weights that each visible child should occupy in the viewport.

The length of flexWeights represents how many items should be visible at a time in the viewport. For example, setting flexWeights to <int>[3, 2, 1] means there are 3 carousel items and their extents are 3/6, 2/6 and 1/6 of the viewport extent.

This is a required property in CarouselView.weighted. This is null for default CarouselView. The integers must be greater than 0.

Implementation

final List<int>? flexWeights;