diff --git a/lib/Screens/pos_sale/pos_sale.dart b/lib/Screens/pos_sale/pos_sale.dart index 4a46c25..b934fb2 100644 --- a/lib/Screens/pos_sale/pos_sale.dart +++ b/lib/Screens/pos_sale/pos_sale.dart @@ -925,7 +925,7 @@ class _PosSaleScreenState extends ConsumerState { itemBuilder: (context, index) { final item = providerData.cartItemList[index]; return Row( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( child: Column( @@ -940,9 +940,9 @@ class _PosSaleScreenState extends ConsumerState { maxLines: 2, overflow: TextOverflow.ellipsis, ), - SizedBox(height: 4), + const SizedBox(height: 4), Text( - '$currency${item.unitPrice} x ${item.quantity}', + '$currency${item.unitPrice}', style: TextStyle( color: kSubPeraColor, fontSize: 12, @@ -951,14 +951,53 @@ class _PosSaleScreenState extends ConsumerState { ], ), ), + const SizedBox(width: 8), + Row( + children: [ + GestureDetector( + onTap: () { + providerData.quantityDecrease(index); + }, + child: Container( + padding: const EdgeInsets.all(4), + decoration: BoxDecoration( + color: kMainColor.withOpacity(0.1), + borderRadius: BorderRadius.circular(4), + ), + child: const Icon(Icons.remove, size: 16, color: kMainColor), + ), + ), + const SizedBox(width: 8), + Text( + '${item.quantity}', + style: const TextStyle(fontWeight: FontWeight.bold), + ), + const SizedBox(width: 8), + GestureDetector( + onTap: () { + providerData.quantityIncrease(index); + }, + child: Container( + padding: const EdgeInsets.all(4), + decoration: BoxDecoration( + color: kMainColor.withOpacity(0.1), + borderRadius: BorderRadius.circular(4), + ), + child: const Icon(Icons.add, size: 16, color: kMainColor), + ), + ), + ], + ), + const SizedBox(width: 12), Text( '$currency${(item.unitPrice ?? 0) * (item.quantity ?? 0)}', style: const TextStyle( fontWeight: FontWeight.bold, color: kMainColor, + fontSize: 14, ), ), - const SizedBox(width: 8), + const SizedBox(width: 12), GestureDetector( onTap: () { providerData.deleteToCart(index);