updateSectionHeights method
Implementation
void updateSectionHeights(int index, double height) {
bool sameValueFlag = false;
_sectionHeights.update(
index,
(value) {
if (value == height) {
sameValueFlag = true;
}
return height;
},
ifAbsent: () {
return height;
},
);
if (sameValueFlag) {
return;
}
_calculateTopSnapOffsets();
_calculateCenterSnapOffsets();
_calculateBottomSnapOffsets();
_fixLastAnimatedIndexOffset();
}