feat: alphabet list, change Layout etc

This commit is contained in:
2026-10-11 20:37:59 +02:00
parent 489896305d
commit 072f560989
31 changed files with 1847 additions and 832 deletions
+5 -7
View File
@@ -26,10 +26,8 @@ class ProductTile extends StatelessWidget {
final scheme = theme.colorScheme;
final l10n = AppLocalizations.of(context);
final outOfStock = product.stockQuantity <= 0;
final lowStock =
product.stockQuantity > 0 &&
product.stockQuantity <= product.lowStockThreshold;
final outOfStock = product.isOutOfStock;
final lowStock = !outOfStock && product.isLowStock;
final hasImage = product.imagePath != null && product.imagePath!.isNotEmpty;
@@ -142,11 +140,11 @@ class _StockBadge extends StatelessWidget {
Widget build(BuildContext context) {
final scheme = Theme.of(context).colorScheme;
if (product.stockQuantity <= 0) {
if (product.isOutOfStock) {
return const SizedBox.shrink();
}
final low = product.stockQuantity <= product.lowStockThreshold;
final low = product.isLowStock;
return Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
@@ -157,7 +155,7 @@ class _StockBadge extends StatelessWidget {
borderRadius: BorderRadius.circular(999),
),
child: Text(
'${product.stockQuantity}',
product.infiniteStock ? '∞' : '${product.stockQuantity}',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w800,