更新:我通过添加自定义动画以及修改cloud_firestore文档中的代码来修复它。我的代码现在看起来像这样
new Flexible( child: new StreamBuilder<QuerySnapshot> ( stream: chatRoomRef.document(widget.chatRoomID).collection('messages') .orderBy('time').snapshots(), builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot){ return snapshot.hasData ? new ListView( physics: const AlwaysScrollableScrollPhysics(), reverse: true, padding: const EdgeInsets.all(8.0), children: snapshot.data.documents.map((documentSnapshot messageSnapshot) { return new ChatMessageListItem( context: context, animation: _animation, messageSnapshot: messageSnapshot, currentUserEmail: curUserEmail,); }).toList(), ): const CircularProgressIndicator();


