更改分享和解绑消息弹窗
This commit is contained in:
@@ -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]),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user