feat: product is active
This commit is contained in:
parent
1cd2b1778b
commit
2cf5ce7ae8
@ -23,15 +23,17 @@ class ProductCard extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (data.variants!.isEmpty) {
|
if (data.isActive == true) {
|
||||||
context.read<CheckoutBloc>().add(
|
if (data.variants!.isEmpty) {
|
||||||
CheckoutEvent.addItem(data, null),
|
context.read<CheckoutBloc>().add(
|
||||||
);
|
CheckoutEvent.addItem(data, null),
|
||||||
} else {
|
);
|
||||||
showDialog(
|
} else {
|
||||||
context: context,
|
showDialog(
|
||||||
builder: (context) => VariantDialog(product: data),
|
context: context,
|
||||||
);
|
builder: (context) => VariantDialog(product: data),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -161,6 +163,14 @@ class ProductCard extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
if (data.isActive == false)
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(8.0)),
|
||||||
|
color: AppColors.grey.withOpacity(0.5),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user