I'm trying to build a Flutter Application. The application mostly consists of ListViews which are filled with data fetched from an API. Randomly the application freezes, not responsive at all, even tapping on buttons which are not part of the current interface (i.e menu). No error messages are shown in the debugger and even hot restart does not work in this case, the application must be stopped and run from start. Does anyone have any idea what may cause this issue? Thanks
Widget _buildMessageDisplay() { return Consumer<ChatScreenProvider>( builder: (context, chatState, child) { return FutureBuilder( builder: (context, projectSnap) { if (projectSnap.connectionState == ConnectionState.done) { return Padding( padding: EdgeInsets.symmetric( horizontal: 4.0, ), child: ListView.builder( physics: ClampingScrollPhysics(), controller: _scrollController, itemCount: chatState.messages.length, reverse: true, itemBuilder: (context, index) { final ct = _buildChatThread(chatState.messages[index]); return ct; }, ), ); } return Text(''); }, future: _getMessages, ); }, ); }