computeIndex method
void
computeIndex()
Implementation
void computeIndex() {
Element? parent;
indexElement.visitAncestorElements((element) {
parent = element;
return false;
});
if (parent == null) {
isPage = true;
return;
}
bool found = false;
_index = 0;
parent!.visitChildElements((element) {
if (element == indexElement) {
found = true;
}
if (!found) {
_index++;
}
});
}