feat: alphabet list, change Layout etc
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user