多语言后端数据
This commit is contained in:
@@ -1288,11 +1288,11 @@ Future<void> showDeleteDeviceConfirmDialog({
|
||||
style: TextStyle(fontSize: 26.rpx, color: Colors.black87),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '删除后,',
|
||||
text: '删除后,'.tr,
|
||||
style:
|
||||
TextStyle(color: Colors.red, fontSize: 26.rpx)),
|
||||
TextSpan(
|
||||
text: '该设备的历史数据将被清除',
|
||||
text: '该设备的历史数据将被清除'.tr,
|
||||
style: TextStyle(fontSize: 26.rpx),
|
||||
),
|
||||
],
|
||||
@@ -1319,7 +1319,7 @@ Future<void> showDeleteDeviceConfirmDialog({
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
'取消',
|
||||
'取消'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx, color: Colors.white),
|
||||
),
|
||||
@@ -1340,7 +1340,7 @@ Future<void> showDeleteDeviceConfirmDialog({
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
'删除',
|
||||
'删除'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx, color: Colors.white),
|
||||
),
|
||||
@@ -1361,4 +1361,209 @@ Future<void> showDeleteDeviceConfirmDialog({
|
||||
));
|
||||
},
|
||||
);
|
||||
|
||||
//消息弹窗
|
||||
}
|
||||
|
||||
// Future<void> showMessageConfirmDialog({
|
||||
// required BuildContext context,
|
||||
// required VoidCallback onConfirm,
|
||||
// required VoidCallback onCancel,
|
||||
// required String title,
|
||||
// }) async {
|
||||
// await showDialog(
|
||||
// context: context,
|
||||
// barrierDismissible: true,
|
||||
// builder: (BuildContext context) {
|
||||
// return FrostedDialog(
|
||||
// blurSigma: 3.0,
|
||||
// child: Container(
|
||||
// width: 520.rpx,
|
||||
// height: 460.rpx,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(20.0),
|
||||
// ),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsets.only(
|
||||
// left: 45.rpx, right: 45.rpx, top: 90.rpx, bottom: 60.rpx),
|
||||
// child: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// Text(
|
||||
// title,
|
||||
// style: TextStyle(
|
||||
// fontSize: 30.rpx,
|
||||
// color: Colors.black,
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(height: 12),
|
||||
// RichText(
|
||||
// textAlign: TextAlign.center,
|
||||
// text: TextSpan(
|
||||
// style: TextStyle(fontSize: 26.rpx, color: Colors.black87),
|
||||
// children: [
|
||||
// TextSpan(
|
||||
// text: '有一条新的设备分享消息,'.tr,
|
||||
// style:
|
||||
// TextStyle(color: Colors.red, fontSize: 26.rpx)),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(height: 24),
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// CustomCard(
|
||||
// gradientDirection: GradientDirection.vertical,
|
||||
// borderRadius: 16.rpx,
|
||||
// onTap: () {
|
||||
// Get.back();
|
||||
// onCancel();
|
||||
// },
|
||||
// colors: [
|
||||
// Color(0xFF1592AA),
|
||||
// Color(0XFF0C83A7),
|
||||
// Color(0XFF006FA3)
|
||||
// ],
|
||||
// child: Container(
|
||||
// width: 200.rpx,
|
||||
// height: 90.rpx,
|
||||
// alignment: Alignment.center,
|
||||
// child: Text(
|
||||
// '取消'.tr,
|
||||
// style: TextStyle(
|
||||
// fontSize: 26.rpx, color: Colors.white),
|
||||
// ),
|
||||
// )),
|
||||
// CustomCard(
|
||||
// borderRadius: 16.rpx,
|
||||
// onTap: () {
|
||||
// Get.back();
|
||||
// onConfirm();
|
||||
// },
|
||||
// colors: [
|
||||
// Color(0xFF1592AA),
|
||||
// Color(0XFF0C83A7),
|
||||
// Color(0XFF006FA3)
|
||||
// ],
|
||||
// child: Container(
|
||||
// width: 200.rpx,
|
||||
// height: 90.rpx,
|
||||
// alignment: Alignment.center,
|
||||
// child: Text(
|
||||
// '去查看'.tr,
|
||||
// style: TextStyle(
|
||||
// fontSize: 26.rpx, color: Colors.white),
|
||||
// ),
|
||||
// ))
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ));
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
Future<void> showMessageConfirmDialog({
|
||||
required VoidCallback onConfirm,
|
||||
required VoidCallback onCancel,
|
||||
required String title,
|
||||
}) async {
|
||||
await Get.dialog(
|
||||
FrostedDialog(
|
||||
blurSigma: 3.0,
|
||||
child: Container(
|
||||
width: 520.rpx,
|
||||
height: 460.rpx,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 45.rpx, right: 45.rpx, top: 90.rpx, bottom: 60.rpx),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 30.rpx,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
style: TextStyle(fontSize: 26.rpx, color: Colors.black87),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '有一条新的设备分享消息,'.tr,
|
||||
style: TextStyle(color: Colors.red, fontSize: 26.rpx)),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
CustomCard(
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
borderRadius: 16.rpx,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onCancel();
|
||||
},
|
||||
colors: [
|
||||
Color(0xFF1592AA),
|
||||
Color(0XFF0C83A7),
|
||||
Color(0XFF006FA3)
|
||||
],
|
||||
child: Container(
|
||||
width: 200.rpx,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
'取消'.tr,
|
||||
style: TextStyle(fontSize: 26.rpx, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onConfirm();
|
||||
},
|
||||
colors: [
|
||||
Color(0xFF1592AA),
|
||||
Color(0XFF0C83A7),
|
||||
Color(0XFF006FA3)
|
||||
],
|
||||
child: Container(
|
||||
width: 200.rpx,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
'去查看'.tr,
|
||||
style: TextStyle(fontSize: 26.rpx, color: Colors.white),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
barrierDismissible: true,
|
||||
// 监听返回或点击遮罩关闭事件
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user