diff --git a/packages/smooth_app/lib/generic_lib/widgets/smooth_card.dart b/packages/smooth_app/lib/generic_lib/widgets/smooth_card.dart index 7f1bd6a3ce0..9c492770aef 100644 --- a/packages/smooth_app/lib/generic_lib/widgets/smooth_card.dart +++ b/packages/smooth_app/lib/generic_lib/widgets/smooth_card.dart @@ -12,11 +12,9 @@ class SmoothCard extends StatelessWidget { const SmoothCard({ required this.child, this.color, - this.margin = const EdgeInsets.only( - right: SMALL_SPACE, - left: SMALL_SPACE, - top: VERY_SMALL_SPACE, - bottom: VERY_SMALL_SPACE, + this.margin = const EdgeInsets.symmetric( + horizontal: SMALL_SPACE, + vertical: VERY_SMALL_SPACE, ), this.padding = const EdgeInsets.all(5.0), this.elevation = 8, diff --git a/packages/smooth_app/lib/pages/product/summary_card.dart b/packages/smooth_app/lib/pages/product/summary_card.dart index ac99aa1e869..dc011dd2846 100644 --- a/packages/smooth_app/lib/pages/product/summary_card.dart +++ b/packages/smooth_app/lib/pages/product/summary_card.dart @@ -102,47 +102,53 @@ class _SummaryCardState extends State { Widget _buildLimitedSizeSummaryCard(double parentHeight) { totalPrintableRows = parentHeight ~/ SUMMARY_CARD_ROW_HEIGHT; - return Stack( - children: [ - ClipRRect( - borderRadius: ROUNDED_BORDER_RADIUS, - child: OverflowBox( - alignment: AlignmentDirectional.topStart, - minHeight: parentHeight, - maxHeight: double.infinity, - child: buildProductSmoothCard( - header: _buildProductCompatibilityHeader(context), - body: Padding( - padding: SMOOTH_CARD_PADDING, - child: _buildSummaryCardContent(context), + return Padding( + padding: const EdgeInsets.symmetric( + horizontal: SMALL_SPACE, + vertical: VERY_SMALL_SPACE, + ), + child: Stack( + children: [ + ClipRRect( + borderRadius: ROUNDED_BORDER_RADIUS, + child: OverflowBox( + alignment: AlignmentDirectional.topStart, + minHeight: parentHeight, + maxHeight: double.infinity, + child: buildProductSmoothCard( + header: _buildProductCompatibilityHeader(context), + body: Padding( + padding: SMOOTH_CARD_PADDING, + child: _buildSummaryCardContent(context), + ), + margin: EdgeInsets.zero, ), - margin: EdgeInsets.zero, ), ), - ), - Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Container( - padding: const EdgeInsets.symmetric( - vertical: SMALL_SPACE, - ), - decoration: BoxDecoration( - color: Theme.of(context).cardColor, - borderRadius: - const BorderRadius.vertical(bottom: ROUNDED_RADIUS), - ), - child: Center( - child: Text( - AppLocalizations.of(context)!.tab_for_more, - style: Theme.of(context).primaryTextTheme.bodyText1, + Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + padding: const EdgeInsets.symmetric( + vertical: SMALL_SPACE, + ), + decoration: BoxDecoration( + color: Theme.of(context).cardColor, + borderRadius: + const BorderRadius.vertical(bottom: ROUNDED_RADIUS), + ), + child: Center( + child: Text( + AppLocalizations.of(context)!.tab_for_more, + style: Theme.of(context).primaryTextTheme.bodyText1, + ), ), ), - ), - ], - ), - ], + ], + ), + ], + ), ); }