更新设备校准
This commit is contained in:
@@ -133,10 +133,10 @@ void showBindDoubleDialog(BuildContext context, List<BleDeviceData> devices) {
|
||||
);
|
||||
}
|
||||
|
||||
void showHaveBindDialog(BuildContext context) {
|
||||
Future<void> showHaveBindDialog(BuildContext context) async {
|
||||
ThemeController themeController = Get.find();
|
||||
|
||||
showDialog(
|
||||
return showDialog(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
barrierColor: Colors.black.withOpacity(0.5),
|
||||
@@ -207,7 +207,7 @@ void showHaveBindDialog(BuildContext context) {
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
Get.back(result: true);
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
@@ -860,27 +860,24 @@ void showWifiDialog(
|
||||
);
|
||||
}
|
||||
|
||||
String showTipDialog(
|
||||
Future<void> showTipDialog(
|
||||
BuildContext context,
|
||||
Widget widget, {
|
||||
Color? backgroundColor, // 新增可选参数
|
||||
}
|
||||
// String title,
|
||||
) {
|
||||
Color? backgroundColor,
|
||||
}) {
|
||||
ThemeController themeController = Get.find();
|
||||
BlueteethBindController blueteethBindController = Get.find();
|
||||
|
||||
showDialog(
|
||||
return showDialog(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
barrierColor: Colors.black.withOpacity(0.5), // 背景模糊色
|
||||
barrierColor: Colors.black.withOpacity(0.5),
|
||||
builder: (BuildContext context) {
|
||||
return FrostedDialog(
|
||||
blurSigma: 3.0,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
backgroundColor ?? themeController.currentColor.sc17, // 使用默认颜色
|
||||
color: backgroundColor ?? themeController.currentColor.sc17,
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
padding: EdgeInsetsDirectional.fromSTEB(64.rpx, 0, 64.rpx, 0),
|
||||
@@ -892,63 +889,20 @@ String showTipDialog(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// 标题
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.end,
|
||||
// children: [
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.transparent, // 容器背景色
|
||||
// highlightColor:
|
||||
// themeController.currentColor.sc21, // 点击时的背景色
|
||||
// padding: EdgeInsets.zero, // 这里去掉外部的 padding,避免影响点击范围
|
||||
// onTap: () {
|
||||
// Get.back();
|
||||
// },
|
||||
// child: Padding(
|
||||
// padding:
|
||||
// EdgeInsetsDirectional.fromSTEB(0, 33.rpx, 0, 0.rpx),
|
||||
// child: SvgPicture.asset(
|
||||
// 'assets/img/icon/close.svg',
|
||||
// width: 25.rpx,
|
||||
// height: 25.rpx, // 如果 SVG 中没有固定颜色,使用 color 设置
|
||||
// color: themeController.currentColor.sc3,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
|
||||
// Align(
|
||||
// alignment: AlignmentDirectional(0, 0),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0.rpx, 93.rpx, 0, 74.rpx),
|
||||
// child: Text(
|
||||
// title,
|
||||
// style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 30.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController.currentColor.sc3,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0, 0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 93.rpx, 0, 74.rpx),
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.rpx, 93.rpx, 0, 74.rpx),
|
||||
child: widget,
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 19.rpx, 0, 60.rpx),
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
Get.back(); // 关闭对话框
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
@@ -972,13 +926,12 @@ String showTipDialog(
|
||||
.override(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 17.rpx,
|
||||
)),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -990,5 +943,4 @@ String showTipDialog(
|
||||
);
|
||||
},
|
||||
);
|
||||
return "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user