I\'m using CustomScrollView, and providing it with a controller. ScrollController works, I even added a listener to it and print out the position of the scroll view.
Delaying it is not the right solution. Better to wait till the tree is done building by using
WidgetsBinding.instance
.addPostFrameCallback((_){});
sample
WidgetsBinding.instance.addPostFrameCallback((_) {
if(pageController.hasClients){
pageController.animateToPage(page index, duration: Duration(milliseconds: 1), curve: Curves.easeInOut);
}
});