更改分享和解绑消息弹窗

This commit is contained in:
czz
2025-08-26 17:56:36 +08:00
parent 5ac6c891b3
commit daf782bf9f
10 changed files with 407 additions and 90 deletions

View File

@@ -182,13 +182,13 @@ class _MessagePageState extends State<MessagePage> {
final list = messageController.bodyMessageList;
return list.isEmpty
? const NullDataWidget()
: _buildMessageListView(list);
: _buildMessageListView(list, "app_vsm");
}),
Obx(() {
final list = messageController.systemMessageList;
return list.isEmpty
? const NullDataWidget()
: _buildMessageListView(list);
: _buildMessageListView(list, "app_system");
}),
],
),
@@ -253,7 +253,7 @@ class _MessagePageState extends State<MessagePage> {
alignment: Alignment.center,
child: Obx(() {
return ClickableContainer(
padding: EdgeInsets.zero,
padding: EdgeInsets.symmetric(horizontal: 16.rpx, vertical: 8.rpx),
backgroundColor: Colors.transparent,
highlightColor: themeController.currentColor.sc21,
borderRadius: 8.rpx,
@@ -325,7 +325,7 @@ class _MessagePageState extends State<MessagePage> {
alignment: Alignment.center,
child: Obx(() {
return ClickableContainer(
padding: EdgeInsets.zero,
padding: EdgeInsets.symmetric(horizontal: 16.rpx, vertical: 8.rpx),
backgroundColor: Colors.transparent,
highlightColor: themeController.currentColor.sc21,
borderRadius: 8.rpx,
@@ -386,21 +386,25 @@ class _MessagePageState extends State<MessagePage> {
);
}
Widget _buildMessageListView(List dataList) {
return Container(
width: double.infinity,
padding: EdgeInsets.symmetric(horizontal: 30.rpx),
child: SingleChildScrollView(
child: Column(
children: [
SizedBox(height: 30.rpx),
...dataList
.map((item) => MhMessageListWidget(data: item))
.toList()
.divide(SizedBox(height: 30.rpx)),
SizedBox(height: 30.rpx),
],
),
Widget _buildMessageListView(List dataList, String type) {
return NotificationListener<ScrollNotification>(
onNotification: (scrollInfo) {
if (scrollInfo.metrics.pixels == scrollInfo.metrics.maxScrollExtent) {
// 滑到底部,加载下一页
messageController.loadMore(type);
}
return true;
},
child: ListView.builder(
padding: EdgeInsets.symmetric(horizontal: 30.rpx, vertical: 30.rpx),
itemCount: dataList.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(bottom: 30.rpx),
child: MhMessageListWidget(data: dataList[index]),
);
},
),
);
}