scrollByIndex method
Scrolls this ListView until the item at index is visible.
This is designed for lazily-built lists where the total scroll extent can't be
known up front. For the last item (index == childNodes.length - 1), this will
repeatedly scroll to the current maxScrollExtent until the end stabilizes.
Implementation
Future<bool> scrollByIndex(
int index, {
bool animated = true,
Duration duration = const Duration(milliseconds: 250),
double? alignment,
}) async {
final WebFListViewState? currentState = state;
if (currentState == null) return false;
return await currentState.scrollByIndex(
index,
animated: animated,
duration: duration,
alignment: alignment,
);
}