From 87d54be200c110beacfb8f5415ba42a7ee1e2cc6 Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 11 Feb 2026 07:15:20 -0800 Subject: [PATCH] fix: Remove infinite minimumSize from ElevatedButton/OutlinedButton theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The theme set minimumSize: Size(double.infinity, 52) which creates an internal ConstrainedBox(w=Infinity) inside every button. This crashes when any button is placed in unbounded width context (Row). Changed to Size(0, 52) — GenexButton's LayoutBuilder handles width. Co-Authored-By: Claude Opus 4.6 --- frontend/mobile/lib/app/theme/app_theme.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/mobile/lib/app/theme/app_theme.dart b/frontend/mobile/lib/app/theme/app_theme.dart index df4dc44..7b7bdc1 100644 --- a/frontend/mobile/lib/app/theme/app_theme.dart +++ b/frontend/mobile/lib/app/theme/app_theme.dart @@ -107,7 +107,7 @@ class AppTheme { backgroundColor: AppColors.primary, foregroundColor: Colors.white, elevation: 0, - minimumSize: const Size(double.infinity, AppSpacing.buttonHeight), + minimumSize: const Size(0, AppSpacing.buttonHeight), shape: RoundedRectangleBorder( borderRadius: AppSpacing.borderRadiusMd, ), @@ -120,7 +120,7 @@ class AppTheme { style: OutlinedButton.styleFrom( foregroundColor: AppColors.primary, side: const BorderSide(color: AppColors.primary, width: 1.5), - minimumSize: const Size(double.infinity, AppSpacing.buttonHeight), + minimumSize: const Size(0, AppSpacing.buttonHeight), shape: RoundedRectangleBorder( borderRadius: AppSpacing.borderRadiusMd, ),