dev #1
@ -23,6 +23,7 @@ class ProductCard extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if (data.isActive == true) {
|
||||||
if (data.variants!.isEmpty) {
|
if (data.variants!.isEmpty) {
|
||||||
context.read<CheckoutBloc>().add(
|
context.read<CheckoutBloc>().add(
|
||||||
CheckoutEvent.addItem(data, null),
|
CheckoutEvent.addItem(data, null),
|
||||||
@ -33,6 +34,7 @@ class ProductCard extends StatelessWidget {
|
|||||||
builder: (context) => VariantDialog(product: data),
|
builder: (context) => VariantDialog(product: data),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@ -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