Skip to content

Commit

Permalink
design : make product card responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
cho4u4o committed Oct 29, 2024
1 parent 65186fa commit 2fa5580
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/widgets/product_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class ProductCard extends StatelessWidget {

@override
Widget build(BuildContext context) {
var screenHeight = MediaQuery.of(context).size.height;
var screenWidth = MediaQuery.of(context).size.width;
return InkWell(
onTap: () {
Expand All @@ -28,7 +29,7 @@ class ProductCard extends StatelessWidget {
},
child: Container(
width: (screenWidth - 55) / 2,
height: 230,
height: screenHeight * 0.24,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
Expand Down

0 comments on commit 2fa5580

Please sign in to comment.