phase3: util_web + shop_scroll (custom scroll) null-safe; global Key? param fix

This commit is contained in:
2026-07-24 20:24:57 +08:00
parent f831fd1405
commit e2f815e141
133 changed files with 164 additions and 163 deletions

View File

@@ -12,7 +12,7 @@ import '../../utils/utils.dart';
class CreateOnlineStore1 extends StatefulWidget {
final int businessId;
const CreateOnlineStore1(this.businessId, {Key key}) : super(key: key);
const CreateOnlineStore1(this.businessId, {Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -19,7 +19,7 @@ import '../../widgets/general/attribute/radio_options.dart';
class MobileAttributeSelection extends StatefulWidget {
final Product product;
final Business business;
final Key key;
final Key? key;
final GlobalKey startKey;
const MobileAttributeSelection({@required this.product, @required this.business, this.key, this.startKey})

View File

@@ -18,7 +18,7 @@ import '../../widgets/mobile/MobileBottomNav.dart';
class MobileBlog extends StatefulWidget {
final int businessId;
const MobileBlog({Key key, this.businessId}) : super(key: key);
const MobileBlog({Key? key, this.businessId}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -11,7 +11,7 @@ import '../../utils/utils.dart';
class MobileBuyService extends StatefulWidget {
final Map<String, dynamic> data;
const MobileBuyService(this.data, {Key key})
const MobileBuyService(this.data, {Key? key})
: super(key: key);
@override

View File

@@ -15,7 +15,7 @@ import '../../utils/utils.dart';
class MobileChangeMobileOrEmail extends StatefulWidget {
final bool isMobile;
const MobileChangeMobileOrEmail(this.isMobile, {Key key}) : super(key: key);
const MobileChangeMobileOrEmail(this.isMobile, {Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -6,7 +6,7 @@ import '../../utils/utils.dart';
import '../../generated/l10n.dart';
class MobileChangePassword extends StatefulWidget {
const MobileChangePassword({Key key}) : super(key: key);
const MobileChangePassword({Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -32,7 +32,7 @@ import '../../utils/utils.dart';
import '../../widgets/general/sliding_up_panel.dart';
class MobileCheckout extends StatefulWidget {
final Key key;
final Key? key;
final int businessId;
const MobileCheckout(this.businessId, {this.key,}) : super(key: key);

View File

@@ -15,7 +15,7 @@ import '../../widgets/general/text_link.dart';
class MobileContactUs extends StatefulWidget {
final Business business;
const MobileContactUs(this.business, {Key key}) : super(key: key);
const MobileContactUs(this.business, {Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -14,7 +14,7 @@ import '../../utils/utils.dart';
class MobileCoupons extends StatefulWidget {
final int contactId;
final Key key;
final Key? key;
const MobileCoupons(this.contactId, {this.key});
@override

View File

@@ -7,7 +7,7 @@ import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dar
class MobileDownloadApps extends StatefulWidget {
final Map<String, dynamic> data;
MobileDownloadApps(this.data, {Key key}) : super(key: key);
MobileDownloadApps(this.data, {Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -18,7 +18,7 @@ import '../general/gender_selection.dart';
import '../../routes.dart';
class MobileEditAddress extends StatefulWidget {
final Key key;
final Key? key;
final Address address;
final int businessId;
const MobileEditAddress(this.address, {this.key, int businessId}) :

View File

@@ -12,7 +12,7 @@ import '../../utils/http_util.dart';
import '../../utils/utils.dart';
class MobileForgotPassword extends StatefulWidget {
const MobileForgotPassword({Key key}) : super(key: key);
const MobileForgotPassword({Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -5,7 +5,7 @@ import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dar
class MobileiGoShowLearnMore extends StatefulWidget {
final Map<String, dynamic> data;
const MobileiGoShowLearnMore(this.data, {Key key}) : super(key: key);
const MobileiGoShowLearnMore(this.data, {Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -11,7 +11,7 @@ import '../../store/actions.dart';
import '../../store/store.dart';
class MobileLogin extends StatefulWidget {
final Key key;
final Key? key;
const MobileLogin({this.key}) : super(key: key);

View File

@@ -25,7 +25,7 @@ double statusBarHeight;
double screenHeight;
class MobileMe extends StatefulWidget {
final Key key;
final Key? key;
const MobileMe({this.key}) : super(key: key);

View File

@@ -4,7 +4,7 @@ import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dar
class MobileMiniPosLearnMore extends StatefulWidget {
final Map<String, dynamic> data;
const MobileMiniPosLearnMore(this.data, {Key key}) : super(key: key);
const MobileMiniPosLearnMore(this.data, {Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -17,7 +17,7 @@ import '../../routes.dart';
class MobileMyAddresses extends StatefulWidget {
final int businessId;
const MobileMyAddresses({Key key, this.businessId}) : super(key: key);
const MobileMyAddresses({Key? key, this.businessId}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -18,7 +18,7 @@ import '../../widgets/mobile/MobileBottomNav.dart';
class MobileMySupport extends StatefulWidget {
final int businessId;
const MobileMySupport({Key key, this.businessId}) : super(key: key);
const MobileMySupport({Key? key, this.businessId}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -11,7 +11,7 @@ import '../../store/store.dart';
import '../../utils/http_util.dart';
class MobileNewAddress extends StatefulWidget {
final Key key;
final Key? key;
final LocatedAddress locatedAddress;
final int businessId;
const MobileNewAddress({this.key, this.locatedAddress, this.businessId}) : super(key: key);

View File

@@ -19,7 +19,7 @@ import '../../utils/utils.dart';
class MobileNewComment extends StatefulWidget {
final Key key;
final Key? key;
final int orderId;
const MobileNewComment(this.orderId, {this.key});

View File

@@ -17,7 +17,7 @@ import '../../store/store.dart';
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
class MobileNewTicket extends StatefulWidget {
final Key key;
final Key? key;
final int businessId;
const MobileNewTicket({this.key, int businessId}) :

View File

@@ -11,7 +11,7 @@ import '../../utils/http_util.dart';
import '../../utils/utils.dart';
class MobileNewUser extends StatefulWidget {
const MobileNewUser({Key key}) : super(key: key);
const MobileNewUser({Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -24,7 +24,7 @@ import '../../routes.dart';
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
class MobileOrderDetail extends StatefulWidget {
final Key key;
final Key? key;
final int orderId;
final bool fromOrders;
const MobileOrderDetail(this.orderId, {this.key, this.fromOrders});

View File

@@ -18,7 +18,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'MobileBottomNav.dart';
class MobileOrders extends StatefulWidget {
final Key key;
final Key? key;
const MobileOrders({this.key});
@override

View File

@@ -18,7 +18,7 @@ import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dar
import '../../utils/utils.dart';
class MobilePayNow extends StatefulWidget {
final Key key;
final Key? key;
final int orderId;
const MobilePayNow(this.orderId, {this.key});

View File

@@ -8,7 +8,7 @@ import '../../models/blog.dart';
class MobilePlainPage extends StatefulWidget {
final Blog blog;
const MobilePlainPage(this.blog, {Key key}) : super(key: key);
const MobilePlainPage(this.blog, {Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

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

View File

@@ -15,7 +15,7 @@ class MobileProductItem extends StatefulWidget {
final Product product;
final Business business;
MobileProductItem({this.product, this.business, Key key})
MobileProductItem({this.product, this.business, Key? key})
: super(key: key);
@override

View File

@@ -13,7 +13,7 @@ import '../../utils/utils.dart';
class MobileRenewLicense extends StatefulWidget {
final int businessId;
const MobileRenewLicense(this.businessId, {Key key}) : super(key: key);
const MobileRenewLicense(this.businessId, {Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -13,7 +13,7 @@ import '../../utils/utils.dart';
class MobileRenewMiniOffice extends StatefulWidget {
final Map<String, dynamic> data;
const MobileRenewMiniOffice(this.data, {Key key}) : super(key: key);
const MobileRenewMiniOffice(this.data, {Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -12,7 +12,7 @@ class MobileResetPassword extends StatefulWidget {
final String mobile;
final String code;
const MobileResetPassword(this.mobile, {this.code, Key key})
const MobileResetPassword(this.mobile, {this.code, Key? key})
: super(key: key);
@override

View File

@@ -14,7 +14,7 @@ import '../../utils/http_util.dart';
import '../../utils/utils.dart';
class MobileSearchPlace extends StatefulWidget {
final Key key;
final Key? key;
final int businessId;
const MobileSearchPlace(this.businessId, {this.key}) : super(key: key);

View File

@@ -12,7 +12,7 @@ class MobileSetPassword extends StatefulWidget {
final String mobile;
final String code;
const MobileSetPassword(this.mobile, {Key key, this.code}) : super(key: key);
const MobileSetPassword(this.mobile, {Key? key, this.code}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -16,7 +16,7 @@ import '../../utils/utils.dart';
import '../../widgets/mobile/mobile_product_item.dart';
class MobileStoreProductSearch extends StatefulWidget {
final Key key;
final Key? key;
final Business business;
const MobileStoreProductSearch(this.business, {this.key});

View File

@@ -15,7 +15,7 @@ import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dar
import '../../utils/utils.dart';
class MobileUserProfile extends StatefulWidget {
final Key key;
final Key? key;
const MobileUserProfile({this.key})
: super(key: key);

View File

@@ -16,7 +16,7 @@ import '../../utils/utils.dart';
import '../../utils/util_io.dart' if (dart.library.html) '../../utils/util_web.dart';
class MobileViewBlog extends StatefulWidget {
final Key key;
final Key? key;
final int bid;
const MobileViewBlog(this.bid, {this.key}) : super(key: key);

View File

@@ -20,7 +20,7 @@ import '../../utils/utils.dart';
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
class MobileViewTicket extends StatefulWidget {
final Key key;
final Key? key;
final int ticketId;
const MobileViewTicket(this.ticketId, {this.key}) : super(key: key);

View File

@@ -19,7 +19,7 @@ class ProductItem extends StatefulWidget {
final double imageWidth;
const ProductItem(this.product, this.business, {
Key key,
Key? key,
this.horizontal = false,
this.imageWidth = 110,
}) : super(key: key);

View File

@@ -18,7 +18,7 @@ import 'product_item.dart';
class ProductSearch extends StatefulWidget {
final Business business;
const ProductSearch(this.business, {Key key}) : super(key: key);
const ProductSearch(this.business, {Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() => ProductSearchState();

View File

@@ -45,7 +45,7 @@ double screenHeight;
class Shop extends StatefulWidget {
final int businessId;
const Shop({Key key, this.businessId}) : super(key: key);
const Shop({Key? key, this.businessId}) : super(key: key);
@override
State<StatefulWidget> createState() => ShopState();