checkRefreshContainerOffset method
void
checkRefreshContainerOffset()
Implementation
void checkRefreshContainerOffset() {
int length = _controller.containerOffsets.length;
if (_listIndex >= length ||
(_listIndex > 0 && _controller.containerOffsets[_listIndex]! <= 0)) {
_refreshContainerLayoutOffsets("zero size");
return;
}
for (int i = 0; i < _listIndex && _listIndex < length - 1; i++) {
double currOffset = _controller.containerOffsets[i]?.toDouble() ?? 0;
double nextOffset = _controller.containerOffsets[i + 1]?.toDouble() ?? 0;
if (currOffset > nextOffset) {
_refreshContainerLayoutOffsets("offset invalid: $currOffset->$nextOffset");
break;
}
}
}