更新界面布局
This commit is contained in:
@@ -437,33 +437,34 @@ void showConfirmDialog(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// 标题
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent, // 容器背景色
|
||||
highlightColor:
|
||||
themeController.currentColor.sc21, // 点击时的背景色
|
||||
padding: EdgeInsets.zero, // 这里去掉外部的 padding,避免影响点击范围
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onCancel();
|
||||
},
|
||||
child: Padding(
|
||||
// padding:
|
||||
// EdgeInsetsDirectional.fromSTEB(0, 33.rpx, 0, 0.rpx),
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
33.rpx, 33.rpx, 33.rpx, 33.rpx),
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/close.svg',
|
||||
width: 25.rpx,
|
||||
height: 25.rpx, // 如果 SVG 中没有固定颜色,使用 color 设置
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.end,
|
||||
// children: [
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.transparent, // 容器背景色
|
||||
// highlightColor:
|
||||
// themeController.currentColor.sc21, // 点击时的背景色
|
||||
// padding: EdgeInsets.zero, // 这里去掉外部的 padding,避免影响点击范围
|
||||
// onTap: () {
|
||||
// Get.back();
|
||||
// onCancel();
|
||||
// },
|
||||
// child: Padding(
|
||||
// // padding:
|
||||
// // EdgeInsetsDirectional.fromSTEB(0, 33.rpx, 0, 0.rpx),
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 33.rpx, 33.rpx, 33.rpx, 33.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(
|
||||
@@ -892,8 +893,8 @@ Future<void> showTipDialog(
|
||||
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,
|
||||
),
|
||||
),
|
||||
@@ -926,8 +927,142 @@ Future<void> 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)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> showUnBindTipDialog(
|
||||
BuildContext context,
|
||||
Widget widget, {
|
||||
Color? backgroundColor,
|
||||
VoidCallback? onConfirm, // “继续”按钮回调
|
||||
VoidCallback? onCancel, // “下次再说”按钮回调
|
||||
}) {
|
||||
ThemeController themeController = Get.find();
|
||||
BlueteethBindController blueteethBindController = Get.find();
|
||||
|
||||
return showDialog(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
barrierColor: Colors.black.withOpacity(0.5),
|
||||
builder: (BuildContext context) {
|
||||
return FrostedDialog(
|
||||
blurSigma: 3.0,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor ?? themeController.currentColor.sc17,
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
padding: EdgeInsetsDirectional.fromSTEB(64.rpx, 0, 64.rpx, 0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: MediaQuery.sizeOf(context).height * 0.656,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0, 0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 93.rpx, 0, 30.rpx),
|
||||
child: widget,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 10.rpx),
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () {
|
||||
Get.back(); // 关闭对话框
|
||||
if (onConfirm != null) {
|
||||
onConfirm(); // 调用确认回调
|
||||
}
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 500.rpx,
|
||||
minHeight: 90.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'继续'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 19.rpx, 0, 60.rpx),
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () {
|
||||
Get.back(); // 关闭对话框
|
||||
if (onCancel != null) {
|
||||
onCancel(); // 调用取消回调
|
||||
}
|
||||
},
|
||||
colors: [Colors.transparent],
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: Colors.white,
|
||||
width: 0.5.rpx,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppConstants().button_container_radius),
|
||||
),
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 500.rpx,
|
||||
minHeight: 90.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'下次再说'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user