这里这个无限集合 ListView Widget 返回一个 listView。这里 listview.builder 用作 listview 的子项。如何使滚动小部件的两个控制器都能够在屏幕中设置动画或跳转
Widget buildMessagesUsingProvider(BuildContext context) {
return Consumer<List<GroupModel>>(
builder: (context, groupList, _child) => Consumer<
FirestoreDataProviderMESSAGESforGROUPCHAT>(
builder: (context, firestoreDataProvider, _) =>
InfiniteCOLLECTIONListViewWidget(
scrollController: realtime,
isreverse: true,
firestoreDataProviderMESSAGESforGROUPCHAT:
firestoreDataProvider,
datatype: Dbkeys.datatypeGROUPCHATMSGS,
refdata: firestoreChatquery,
list: Container(
child: ListView.builder(
controller: _controller,
reverse: true,
padding: EdgeInsets.all(7),
physics: ClampingScrollPhysics(),
shrinkWrap: true,
itemCount: firestoreDataProvider.recievedDocs.length,
itemBuilder: (BuildContext context, int i) {
var dc = firestoreDataProvider.recievedDocs[i];
return buildEachMessage(
dc,
groupList.lastWhere((element) =>
element.docmap[Dbkeys.groupID] ==
widget.groupID));
}),
),
)));
}