Fix: some design fixes
This commit is contained in:
@@ -15,10 +15,10 @@ class ProductCard extends StatelessWidget {
|
||||
});
|
||||
|
||||
double getCardHeight({required BuildContext context}) {
|
||||
if (MediaQuery.of(context).size.width > 600) {
|
||||
return 200;
|
||||
if (MediaQuery.of(context).size.width > 400) {
|
||||
return 300;
|
||||
}
|
||||
return 100;
|
||||
return 160;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -27,7 +27,9 @@ class ProductCard extends StatelessWidget {
|
||||
onTap: onTap,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 80, maxHeight: getCardHeight(context: context)),
|
||||
minHeight: 160,
|
||||
maxHeight: getCardHeight(context: context),
|
||||
),
|
||||
child: Card(
|
||||
elevation: 3,
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
@@ -42,7 +44,8 @@ class ProductCard extends StatelessWidget {
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
name,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
maxLines: 2,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user