phase3: nullable fields/methods, casts, ?.call, pinput/YoutubePlayer v5, buttonColor, dead-code removal. 72->16
This commit is contained in:
@@ -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();
|
||||
}
|
||||
@@ -86,7 +86,7 @@ class ShoppingCartBarState extends State<ShoppingCartBar> {
|
||||
onTap: () {
|
||||
Utils.clearCart(context, cartInfo, onComplete: (_) {
|
||||
if (widget.onEmptyCartListener != null) {
|
||||
widget.onEmptyCartListener();
|
||||
widget.onEmptyCartListener?.call();
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -198,7 +198,7 @@ class ShoppingCartBarState extends State<ShoppingCartBar> {
|
||||
),
|
||||
onTap: () {
|
||||
if (widget.onPanelOpenCloseRequest != null) {
|
||||
widget.onPanelOpenCloseRequest();
|
||||
widget.onPanelOpenCloseRequest?.call();
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user