LoadingMoreCustomScrollView add center attribute
mdddj opened this issue · 0 comments
mdddj commented
CustomScrollView has Key? center
attribute, please add this, tkx
use center eg.
///聊天内容展示
Widget get chatsListWidget {
return LoadingMoreCustomScrollView(
reverse: true,
controller: scroller,
center: // <<< - todo add a center key
slivers: [
LoadingMoreSliverList(SliverListConfig<ChatItemData>(
itemBuilder:renderChatLayoutItem,
sourceList: repository,
indicatorBuilder: (s, c) => kBuildIndicator(s, c, isSliver: true),
extendedListDelegate: const ExtendedListDelegate(closeToTrailing: true),
showNoMore: false
)),
SliverPadding(
padding: EdgeInsets.zero,
key: centerKey,
),
LoadingMoreSliverList(SliverListConfig<ChatItemData>(
itemBuilder: renderChatLayoutItem,
sourceList: repositoryNew,
showNoMore: false,
))
],
);
}
///旧版本
Widget get oldVersion {
return CustomScrollView(
controller: scroller,
center: centerKey,
slivers: [
// ChatUserDetailCard(model.txModel!.conversationID).toSliverWidget,
//旧的聊天记录
SliverPadding(
padding: EdgeInsets.zero,
key: centerKey,
),
//新的聊天记录
const Chats(),
],
);
}