feat: product image and printer type

This commit is contained in:
efrilm
2025-08-03 01:00:33 +07:00
parent 39e3fdc81c
commit e1825fe86f
7 changed files with 108 additions and 93 deletions
@@ -59,9 +59,10 @@ class _OrderMenuState extends State<OrderMenu> {
// color: AppColors.primary,
// ),
CachedNetworkImage(
imageUrl: widget.data.product.name!.contains('http')
? widget.data.product.name!
: '${Variables.baseUrl}/${widget.data.product.name}',
imageUrl: (widget.data.product.imageUrl ?? '')
.contains('http')
? widget.data.product.imageUrl!
: '${Variables.baseUrl}/${widget.data.product.imageUrl}',
width: 50.0,
height: 50.0,
fit: BoxFit.cover,
@@ -42,9 +42,9 @@ class ProductCard extends StatelessWidget {
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(8.0)),
child: CachedNetworkImage(
imageUrl: data.name!.contains('http')
? data.name!
: '${Variables.baseUrl}/${data.name}',
imageUrl: (data.imageUrl ?? "").contains('http')
? data.imageUrl!
: '${Variables.baseUrl}/${data.imageUrl}',
fit: BoxFit.cover,
width: double.infinity,
height: 120,