From c5c4e1667ea50ae84c2747cd8ebf199109fda1cb Mon Sep 17 00:00:00 2001 From: hailin Date: Fri, 2 Jan 2026 21:02:15 -0800 Subject: [PATCH] fix(mobile-app): fix layout constraint error in pending actions page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wrap ElevatedButton in SizedBox(width: 72) to prevent BoxConstraints infinite width error in Row layout. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../pages/pending_actions_page.dart | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/frontend/mobile-app/lib/features/pending_actions/presentation/pages/pending_actions_page.dart b/frontend/mobile-app/lib/features/pending_actions/presentation/pages/pending_actions_page.dart index 93c6e003..946141a7 100644 --- a/frontend/mobile-app/lib/features/pending_actions/presentation/pages/pending_actions_page.dart +++ b/frontend/mobile-app/lib/features/pending_actions/presentation/pages/pending_actions_page.dart @@ -493,26 +493,29 @@ class _PendingActionsPageState extends ConsumerState { ), // 操作按钮 if (isCurrent) - ElevatedButton( - onPressed: _isExecuting ? null : _executeCurrentAction, - style: ElevatedButton.styleFrom( - backgroundColor: const Color(0xFFD4AF37), - foregroundColor: Colors.white, - padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), + SizedBox( + width: 72, + child: ElevatedButton( + onPressed: _isExecuting ? null : _executeCurrentAction, + style: ElevatedButton.styleFrom( + backgroundColor: const Color(0xFFD4AF37), + foregroundColor: Colors.white, + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), ), + child: _isExecuting + ? const SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator( + strokeWidth: 2, + color: Colors.white, + ), + ) + : const Text('开始'), ), - child: _isExecuting - ? const SizedBox( - width: 20, - height: 20, - child: CircularProgressIndicator( - strokeWidth: 2, - color: Colors.white, - ), - ) - : const Text('开始'), ), ], ),