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) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
if (data.variants!.isEmpty) {
|
||||
context.read<CheckoutBloc>().add(
|
||||
CheckoutEvent.addItem(data, null),
|
||||
);
|
||||
} else {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => VariantDialog(product: data),
|
||||
);
|
||||
if (data.isActive == true) {
|
||||
if (data.variants!.isEmpty) {
|
||||
context.read<CheckoutBloc>().add(
|
||||
CheckoutEvent.addItem(data, null),
|
||||
);
|
||||
} else {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => VariantDialog(product: data),
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
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