phase3: nullable fields/methods, casts, ?.call, pinput/YoutubePlayer v5, buttonColor, dead-code removal. 72->16

This commit is contained in:
2026-08-01 01:21:37 +08:00
parent 137eca4c69
commit 7c69197396
39 changed files with 107 additions and 113 deletions

View File

@@ -25,7 +25,7 @@ class ShoppingCartWidgetState extends State<ShoppingCartWidget> {
@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();
}
@@ -60,7 +60,7 @@ class ShoppingCartWidgetState extends State<ShoppingCartWidget> {
child: row,
width: 160.0,
),
onTap: widget.onTap!,
onTap: () => widget.onTap!(),
),
);
}