phase3: @required->required keyword, nullable for-in iterator fix. 309->251

This commit is contained in:
2026-07-31 14:49:02 +08:00
parent 1aa7cf3477
commit ab06fadea8
20 changed files with 47 additions and 47 deletions

View File

@@ -204,7 +204,7 @@ class DesktopNewCommentState extends State<DesktopNewComment> {
);
if (comment != null && comment.images!.length > 0) {
for (ProductImage image in comment.images) {
for (ProductImage image in comment.images!) {
row.children.add(
Container(
padding: EdgeInsets.only(left: 10.0),

View File

@@ -190,7 +190,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
}
}
for (CartLineItem lineItem in order.cartInfo!.productList) {
for (CartLineItem lineItem in order.cartInfo!.productList!) {
col.children.add(Container(
padding: EdgeInsets.only(top: 16.0, bottom: 0.0),
@@ -884,7 +884,7 @@ class DesktopOrderDetailState extends State<DesktopOrderDetail> {
),
),);
for (Fulfillment fulfillment in order.fulfillments) {
for (Fulfillment fulfillment in order.fulfillments!) {
col.children.add(Container(
padding: EdgeInsets.only(top: 10.0, bottom: 10.0),
width: double.infinity,

View File

@@ -30,7 +30,7 @@ class DesktopProductDetailPage extends StatefulWidget {
final Product product;
const DesktopProductDetailPage(
{@required this.business, @required this.product, Key? key})
{required this.business, required this.product, Key? key})
: super(key: key);
@override

View File

@@ -11,7 +11,7 @@ class DesktopShoppingCartWidget extends StatefulWidget {
final Business business;
final Function? onTap;
DesktopShoppingCartWidget({@required this.business, this.onTap});
DesktopShoppingCartWidget({required this.business, this.onTap});
@override
State<StatefulWidget> createState() => DesktopShoppingCartWidgetState();

View File

@@ -12,7 +12,7 @@ class ShoppingCartWidget extends StatefulWidget {
final Business business;
final Function? onTap;
ShoppingCartWidget({@required this.business, this.onTap});
ShoppingCartWidget({required this.business, this.onTap});
@override
State<StatefulWidget> createState() => ShoppingCartWidgetState();