SwayzeHeaderState constructor
SwayzeHeaderState({})
Creates a header state from an unsorted list of SwayzeHeaderData.
This is axis agnostic.
Implementation
SwayzeHeaderState({
required this.defaultHeaderExtent,
required this.count,
required Iterable<SwayzeHeaderData> headerData,
required int frozenCount,
int? elasticCount,
}) : _frozenCount = frozenCount,
elasticCount = elasticCount ?? 0,
_customSizedHeaders = headerData.fold(
SplayTreeMap<int, SwayzeHeaderData>(),
(previousValue, element) {
previousValue[element.index] = element;
return previousValue;
},
);