getTraversalSteps method
int
getTraversalSteps(
- PageDLLTraversalDirection direction, [
- PageDLLData? pageDLLData,
- dynamic i = 0
Implementation
int getTraversalSteps(PageDLLTraversalDirection direction,
[PageDLLData? pageDLLData, i = 0]) {
final page = pageDLLData ?? this;
if (direction == PageDLLTraversalDirection.left) {
if (page.isFirstPage()) return i;
return getTraversalSteps(direction, page.previousPage, i + 1);
} else {
if (page.isLastPage()) return i;
return getTraversalSteps(direction, page.nextPage, i + 1);
}
}