Future<void> loadingNewMessage({bool hasNext = false}) async { if (hasNext) { // write your logic code here refreshController.loadComplete(); } else { refreshController.loadNoData(); } }