add decrease increase qty on possales
This commit is contained in:
@@ -925,7 +925,7 @@ class _PosSaleScreenState extends ConsumerState<PosSaleScreen> {
|
||||
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<PosSaleScreen> {
|
||||
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<PosSaleScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user