fix(runtime): 同类 nullfix 脚本误加 ! 全库修复 - getCartInfoByBusiness 返回可空但末尾误加 !, 后接 if(x!=null) 判空. 影响: shopping_cart_bar/shopping_cart_widget/desktop_shopping_cart_widget(可空目标去!); shop_products/mobile shop(非空声明改 CartInfo?)

This commit is contained in:
2026-08-01 02:27:50 +08:00
parent 639d2033f0
commit 95e40f31cc
5 changed files with 6 additions and 6 deletions

View File

@@ -41,7 +41,7 @@ class ShoppingCartBarState extends State<ShoppingCartBar> {
@override
Widget build(BuildContext context) {
totalPrice = 0.0;
cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business)!;
cartInfo = Utils.getCartInfoByBusiness(store.state.cartInfos, widget.business);
if (cartInfo != null && cartInfo!.businessInfo!.id == widget.business.id) {
totalPrice = cartInfo!.getTotalPrice();
}