phase3: nullfix arg-bang handler (argument_type/invalid_assignment). 872 -> 621
This commit is contained in:
@@ -61,7 +61,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
|
||||
Widget build(BuildContext context) {
|
||||
if (widget.product!.leftNum == null) {
|
||||
_qty = 0;
|
||||
cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business);
|
||||
cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business!);
|
||||
if (cartInfo != null) {
|
||||
for (var i = 0; i < cartInfo.productList!.length; i++) {
|
||||
if (cartInfo.productList![i].product!.id == widget.product!.id
|
||||
@@ -102,7 +102,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
|
||||
}
|
||||
if (widget.addToBasket) {
|
||||
_qty = 0;
|
||||
cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business);
|
||||
cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business!);
|
||||
if (cartInfo != null) {
|
||||
for (var i = 0; i < cartInfo.productList!.length; i++) {
|
||||
if (cartInfo.productList![i].product!.id == widget.product!.id) {
|
||||
@@ -195,7 +195,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
|
||||
);
|
||||
} else {
|
||||
_qty = 0;
|
||||
cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business);
|
||||
cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business!);
|
||||
if (cartInfo != null) {
|
||||
for (var i = 0; i < cartInfo.productList!.length; i++) {
|
||||
if (cartInfo.productList![i].product!.id == widget.product!.id) {
|
||||
@@ -336,9 +336,9 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
|
||||
product: widget.product, business: widget.business, startKey: startKey,)),
|
||||
);
|
||||
} else {
|
||||
eventBus.fire(new OnProductWillAddToCart(widget.product, {},
|
||||
eventBus.fire(new OnProductWillAddToCart(widget.product!, {},
|
||||
widget.product!.price, widget.product!.description,
|
||||
widget.business, buttonKey: startKey));
|
||||
widget.business!, buttonKey: startKey));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -375,7 +375,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
|
||||
}
|
||||
} else {
|
||||
eventBus.fire(new OnProductWillRemoveFromCart(
|
||||
widget.product, -1, widget.business));
|
||||
widget.product!, -1, widget.business!));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user