fix: Remove infinite minimumSize from ElevatedButton/OutlinedButton theme
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 <noreply@anthropic.com>
This commit is contained in:
parent
665e494b4a
commit
87d54be200
|
|
@ -107,7 +107,7 @@ class AppTheme {
|
||||||
backgroundColor: AppColors.primary,
|
backgroundColor: AppColors.primary,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
minimumSize: const Size(double.infinity, AppSpacing.buttonHeight),
|
minimumSize: const Size(0, AppSpacing.buttonHeight),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: AppSpacing.borderRadiusMd,
|
borderRadius: AppSpacing.borderRadiusMd,
|
||||||
),
|
),
|
||||||
|
|
@ -120,7 +120,7 @@ class AppTheme {
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
foregroundColor: AppColors.primary,
|
foregroundColor: AppColors.primary,
|
||||||
side: const BorderSide(color: AppColors.primary, width: 1.5),
|
side: const BorderSide(color: AppColors.primary, width: 1.5),
|
||||||
minimumSize: const Size(double.infinity, AppSpacing.buttonHeight),
|
minimumSize: const Size(0, AppSpacing.buttonHeight),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: AppSpacing.borderRadiusMd,
|
borderRadius: AppSpacing.borderRadiusMd,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue