I want listview should scroll to last element of listview on start of app. How can i do it? i tried scrolling in initState but that raised an error. I used this code in initState:-
_scrollController.animateTo(
_scrollController.position.maxScrollExtent,
curve: Curves.easeOut,
duration: const Duration(milliseconds: 300),
);
the error i got was:-
ScrollController not attached to any scroll views.
When you initialize the ScrollController
just pass a large value for the initialScrollOffset