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:
hailin 2025-12-10 08:07:27 -08:00
parent 0b3ddd51bd
commit 3dcf685715
1 changed files with 52 additions and 21 deletions

View File

@ -84,6 +84,11 @@ class _PlantingConfirmDialogState extends State<PlantingConfirmDialog> {
}
}
///
void _handleClose() {
Navigator.pop(context, false);
}
@override
Widget build(BuildContext context) {
return Dialog(
@ -104,27 +109,53 @@ class _PlantingConfirmDialogState extends State<PlantingConfirmDialog> {
),
],
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 32),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
//
_buildWarningIcon(),
const SizedBox(height: 4),
//
_buildTitle(),
const SizedBox(height: 4),
//
_buildContent(),
const SizedBox(height: 4),
//
_buildCountdownText(),
const SizedBox(height: 4),
//
_buildConfirmButton(),
],
),
child: Stack(
children: [
//
Padding(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 32),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
//
_buildWarningIcon(),
const SizedBox(height: 4),
//
_buildTitle(),
const SizedBox(height: 4),
//
_buildContent(),
const SizedBox(height: 4),
//
_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),
),
),
),
),
],
),
),
);