I have been searching for a way to scroll to the bottom of the ListView widget automatically after retrieving data from firebase database. I have seen a number of solutions but they do not work for me.

I find that scrollController.postion.maxScrollExtent is always 0.0. I don't want to use the reverse property of the listView either as that doesn't give me exactly what I want even though very close.

Below is a snippet of the code. When I use chatController.position.maxScrollExtent the value is 0.0 and not the value of the size of the ListView. If I use a listener that listens to scrolls then I see the value of chatController.position.maxScrollExtent but that is not the behaviour I want. I don't want to manually initiate a scroll for the app then go to the bottom of the list. It must do that as I open the app.

Any help will be greatly appreciated. Thanks

            child: Column(
              children: <Widget>[
                  child: ListView(
                    controller: chatController,
                    //shrinkWrap: true,
                    children: [getConversation()],  //list of chats wrapped in a Column widget