设备分享
This commit is contained in:
@@ -39,7 +39,7 @@ class _MhMessageListWidgetState extends State<MhMessageListWidget> {
|
||||
highlightColor: Color(0xFF055466),
|
||||
borderRadius: 20.rpx,
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(31.rpx, 33.rpx, 0.rpx, 33.rpx),
|
||||
EdgeInsetsDirectional.fromSTEB(31.rpx, 33.rpx, 26.rpx, 26.rpx),
|
||||
onTap: () {},
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
@@ -95,66 +95,65 @@ class _MhMessageListWidgetState extends State<MhMessageListWidget> {
|
||||
),
|
||||
].divide(SizedBox(width: 30.rpx)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (messageInfo['type'] == 'app_system')
|
||||
Positioned(
|
||||
bottom: 46.rpx,
|
||||
right: 20.rpx,
|
||||
child: Container(
|
||||
width: 123.rpx,
|
||||
height: 47.rpx,
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius, // 直角
|
||||
colors: messageInfo['status'] == 1
|
||||
? [
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2
|
||||
]
|
||||
: [themeController.currentColor.sc4], // 单色背景
|
||||
enableAnimation: true, // 有点击缩放动画
|
||||
enableGradient: false, // 不用渐变
|
||||
onTap: () {
|
||||
if (messageInfo['status'] == 1) {
|
||||
showConfirmDialog(context, Container(), "是否确认接受该设备".tr,
|
||||
onConfirm: () async {
|
||||
ApiResponse apiResponse = await deviceShareController
|
||||
.confirmShare(messageInfo['data']['shareCode']);
|
||||
if (apiResponse.code == HttpStatusCodes.ok) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: apiResponse.msg!,
|
||||
textColor: themeController.currentColor.sc2,
|
||||
);
|
||||
messageController.getMessageList();
|
||||
messageController.updateAll();
|
||||
} else {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: apiResponse.msg!,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
messageController.getMessageList();
|
||||
messageController.updateAll();
|
||||
}
|
||||
}, onCancel: () {});
|
||||
}
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
getMessageStatus(messageInfo['status']),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: Colors.white,
|
||||
if (messageInfo['type'] == 'app_system')
|
||||
|
||||
// // right: 26.rpx,
|
||||
// left: 26.rpx,
|
||||
Container(
|
||||
// width: 123.rpx,
|
||||
height: 61.rpx,
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx, // 直角
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
colors: [Color(0xFF84F5FF)],
|
||||
enableAnimation: true, // 有点击缩放动画
|
||||
enableGradient: false, // 不用渐变
|
||||
onTap: () {
|
||||
// if (messageInfo['status'] == 1) {
|
||||
// showConfirmDialog(
|
||||
// context, Container(), "是否确认接受该设备".tr,
|
||||
// onConfirm: () async {
|
||||
// ApiResponse apiResponse =
|
||||
// await deviceShareController.confirmShare(
|
||||
// messageInfo['data']['shareCode']);
|
||||
// if (apiResponse.code == HttpStatusCodes.ok) {
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: apiResponse.msg!,
|
||||
// textColor: themeController.currentColor.sc2,
|
||||
// );
|
||||
// messageController.getMessageList();
|
||||
// messageController.updateAll();
|
||||
// } else {
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: apiResponse.msg!,
|
||||
// textColor: themeController.currentColor.sc9,
|
||||
// );
|
||||
// messageController.getMessageList();
|
||||
// messageController.updateAll();
|
||||
// }
|
||||
// }, onCancel: () {});
|
||||
// }
|
||||
Get.toNamed('/messageDetail', arguments: messageInfo);
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
// getMessageStatus(messageInfo['status']),
|
||||
"查看详情",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: Color(0xFF011D33),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user