更新睡眠报告
This commit is contained in:
@@ -31,6 +31,7 @@ class _MessageWidgetWidgetState extends State<MessageWidgetWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var messageInfo = widget.data;
|
||||
print(messageInfo);
|
||||
return Stack(
|
||||
children: [
|
||||
ClickableContainer(
|
||||
@@ -97,63 +98,63 @@ class _MessageWidgetWidgetState extends State<MessageWidgetWidget> {
|
||||
],
|
||||
),
|
||||
),
|
||||
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: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: Colors.white,
|
||||
),
|
||||
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: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -180,7 +181,7 @@ class _MessageWidgetWidgetState extends State<MessageWidgetWidget> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildValueItem(BuildContext context, String value) {
|
||||
Widget _buildValueItem(BuildContext context, value) {
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 62.rpx,
|
||||
@@ -190,7 +191,7 @@ class _MessageWidgetWidgetState extends State<MessageWidgetWidget> {
|
||||
child: Text(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
value,
|
||||
"${value}",
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
|
||||
Reference in New Issue
Block a user