phase3: nullable fields/methods, casts, ?.call, pinput/YoutubePlayer v5, buttonColor, dead-code removal. 72->16
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) {
|
||||
@@ -194,7 +194,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) {
|
||||
|
||||
Reference in New Issue
Block a user