calculateOffsetOfIndex method
Implementation
double calculateOffsetOfIndex(int index) {
var realOffset = 0.0;
if (index > childCount) {
index = childCount;
}
if (index > 0) {
for (var i = 0; i < index - 1; i++) {
realOffset += children[i].height ?? 0;
}
}
return realOffset;
}