Skip to content

Commit

Permalink
fix: Product card template (#4680)
Browse files Browse the repository at this point in the history
Adjust product card template, to better match product card.

Fixes #4668
  • Loading branch information
WildOrangutan committed Oct 4, 2023
1 parent 830720d commit 8ac2fa9
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SmoothProductCardTemplate extends StatelessWidget {
final Color backgroundColor = isDarkMode ? Colors.black : Colors.white;
final double iconSize = IconWidgetSizer.getIconSizeFromContext(context);
final Widget textWidget = Container(
width: screenSize.width * .4,
width: double.infinity,
height: screenSize.width * .04,
decoration: BoxDecoration(
color: itemColor,
Expand Down Expand Up @@ -72,6 +72,7 @@ class SmoothProductCardTemplate extends StatelessWidget {
child: SizedBox(
height: screenSize.width * 0.2,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (barcode == null)
Expand All @@ -81,8 +82,9 @@ class SmoothProductCardTemplate extends StatelessWidget {
barcode!,
style: const TextStyle(fontWeight: FontWeight.bold),
),
if (message == null) textWidget,
if (message != null)
if (message == null)
textWidget
else
Padding(
padding: const EdgeInsetsDirectional.only(
top: SMALL_SPACE),
Expand All @@ -92,6 +94,7 @@ class SmoothProductCardTemplate extends StatelessWidget {
minFontSize: 5,
),
),
Opacity(opacity: 0, child: textWidget)
],
),
),
Expand Down

0 comments on commit 8ac2fa9

Please sign in to comment.