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

@@ -22,7 +22,7 @@ class MobileAttributeSelection extends StatefulWidget {
final Key? key;
final GlobalKey? startKey;
const MobileAttributeSelection({@required this.product, @required this.business, this.key, this.startKey})
const MobileAttributeSelection({required this.product, required this.business, this.key, this.startKey})
: super(key: key);
@override

View File

@@ -816,9 +816,9 @@ class MobileMeState extends State<MobileMe> {
class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
_SliverAppBarDelegate({
@required this.minHeight,
@required this.maxHeight,
@required this.child,
required this.minHeight,
required this.maxHeight,
required this.child,
});
final double minHeight;

View File

@@ -168,7 +168,7 @@ class MobileNewCommentState extends State<MobileNewComment> {
);
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

@@ -205,7 +205,7 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
}
}
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),
@@ -899,7 +899,7 @@ class MobileOrderDetailState extends State<MobileOrderDetail> {
),
),);
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

@@ -33,7 +33,7 @@ class MobileProductDetailPage extends StatefulWidget {
final Product product;
const MobileProductDetailPage(
{@required this.business, @required this.product, Key? key})
{required this.business, required this.product, Key? key})
: super(key: key);
@override
@@ -447,9 +447,9 @@ class MobileProductDetailPageState extends State<MobileProductDetailPage>
class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
_SliverAppBarDelegate({
@required this.minHeight,
@required this.maxHeight,
@required this.child,
required this.minHeight,
required this.maxHeight,
required this.child,
});
final double minHeight;

View File

@@ -582,7 +582,7 @@ class ShopState extends State<Shop>
children: <Widget>[],
);
if (comment.images!.length > 0) {
for (ProductImage image in comment.images) {
for (ProductImage image in comment.images!) {
imageRow.children.add(
GestureDetector(
child: Container(
@@ -1416,7 +1416,7 @@ class ShopState extends State<Shop>
))
],
)));
for (var p in cp.products) {
for (var p in cp.products!) {
var pStack = new Stack(
children: <Widget>[],
);
@@ -1932,9 +1932,9 @@ class ShopState extends State<Shop>
class _SliverAppBarDelegate2 extends SliverPersistentHeaderDelegate {
_SliverAppBarDelegate2({
@required this.minHeight,
@required this.maxHeight,
@required this.child,
required this.minHeight,
required this.maxHeight,
required this.child,
});
final double minHeight;

View File

@@ -23,7 +23,7 @@ class ShoppingCartBar extends StatefulWidget {
final OnPanelOpenCloseRequest? onPanelOpenCloseRequest;
final bool barAtBottom;
final bool hasPicture;
ShoppingCartBar({@required this.business, this.endKey,
ShoppingCartBar({required this.business, this.endKey,
this.onEmptyCartListener, this.onPanelOpenCloseRequest,
this.barAtBottom = false, this.hasPicture = false
});