Fix: some design fixes

This commit is contained in:
2024-06-12 02:03:20 +03:00
parent c0c3ef2ca0
commit 27da063c34
3 changed files with 59 additions and 43 deletions

View File

@@ -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(