feat(mobile): add close button to planting confirm dialog
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0b3ddd51bd
commit
3dcf685715
|
|
@ -84,6 +84,11 @@ class _PlantingConfirmDialogState extends State<PlantingConfirmDialog> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 关闭弹窗
|
||||||
|
void _handleClose() {
|
||||||
|
Navigator.pop(context, false);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Dialog(
|
return Dialog(
|
||||||
|
|
@ -104,27 +109,53 @@ class _PlantingConfirmDialogState extends State<PlantingConfirmDialog> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Stack(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 32),
|
children: [
|
||||||
child: Column(
|
// 主内容
|
||||||
mainAxisSize: MainAxisSize.min,
|
Padding(
|
||||||
children: [
|
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 32),
|
||||||
// 警告图标
|
child: Column(
|
||||||
_buildWarningIcon(),
|
mainAxisSize: MainAxisSize.min,
|
||||||
const SizedBox(height: 4),
|
children: [
|
||||||
// 标题
|
// 警告图标
|
||||||
_buildTitle(),
|
_buildWarningIcon(),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
// 内容说明
|
// 标题
|
||||||
_buildContent(),
|
_buildTitle(),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
// 倒计时提示
|
// 内容说明
|
||||||
_buildCountdownText(),
|
_buildContent(),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
// 确认按钮
|
// 倒计时提示
|
||||||
_buildConfirmButton(),
|
_buildCountdownText(),
|
||||||
],
|
const SizedBox(height: 4),
|
||||||
),
|
// 确认按钮
|
||||||
|
_buildConfirmButton(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 右上角关闭按钮
|
||||||
|
Positioned(
|
||||||
|
top: 8,
|
||||||
|
right: 8,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: _handleClose,
|
||||||
|
child: Container(
|
||||||
|
width: 32,
|
||||||
|
height: 32,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: const Color(0x0D000000),
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.close,
|
||||||
|
size: 18,
|
||||||
|
color: Color(0xFF8B5A2B),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue