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

@@ -15,7 +15,7 @@ import '../../widgets/general/navigationbar.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

@@ -24,7 +24,7 @@ import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dar
class DesktopBlog extends StatefulWidget {
final int businessId;
const DesktopBlog({Key key, this.businessId}) : super(key: key);
const DesktopBlog({Key? key, this.businessId}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

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

View File

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

View File

@@ -8,7 +8,7 @@ import '../../utils/utils.dart';
import '../../widgets/general/breadcrumbs.dart';
class DesktopChangePassword extends StatefulWidget {
const DesktopChangePassword({Key key}) : super(key: key);
const DesktopChangePassword({Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

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

View File

@@ -19,7 +19,7 @@ import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dar
class DesktopContactUs extends StatefulWidget {
final Business business;
const DesktopContactUs(this.business, {Key key}) : super(key: key);
const DesktopContactUs(this.business, {Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() {

View File

@@ -17,7 +17,7 @@ import '../../widgets/general/navigationbar.dart';
class DesktopCoupons extends StatefulWidget {
final int contactId;
final Key key;
final Key? key;
const DesktopCoupons(this.contactId, {this.key});
@override

View File

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

View File

@@ -20,7 +20,7 @@ import '../../utils/utils.dart';
import '../../widgets/general/navigationbar.dart';
class DesktopEditAddress extends StatefulWidget {
final Key key;
final Key? key;
final Address address;
final int businessId;
const DesktopEditAddress(this.address, {this.key, int businessId}) :

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -26,7 +26,7 @@ import '../../widgets/general/breadcrumbs.dart';
import '../../widgets/general/navigationbar.dart';
class DesktopOrderDetail extends StatefulWidget {
final Key key;
final Key? key;
final int orderId;
final bool fromOrders;
const DesktopOrderDetail(this.orderId, {this.key, this.fromOrders});

View File

@@ -22,7 +22,7 @@ import '../../widgets/general/navigationbar.dart';
class DesktopOrders extends StatefulWidget {
final Key key;
final Key? key;
const DesktopOrders({this.key});
@override

View File

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

View File

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

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

@@ -17,7 +17,7 @@ class DesktopProductItem extends StatefulWidget {
final Business business;
final bool horizontal;
DesktopProductItem({this.product, this.business, Key key, this.horizontal = false})
DesktopProductItem({this.product, this.business, Key? key, this.horizontal = false})
: super(key: key);
@override

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -19,7 +19,7 @@ import '../../utils/utils.dart';
import '../../widgets/general/add_remove_button.dart';
class DesktopStoreProductSearch extends StatefulWidget {
final Key key;
final Key? key;
final Business business;
const DesktopStoreProductSearch(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 DesktopUserProfile extends StatefulWidget {
final Key key;
final Key? key;
const DesktopUserProfile({this.key})
: super(key: key);

View File

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

View File

@@ -19,7 +19,7 @@ import '../../utils/utils.dart';
import '../../widgets/general/text_link.dart';
class DesktopViewTicket extends StatefulWidget {
final Key key;
final Key? key;
final int ticketId;
const DesktopViewTicket(this.ticketId, {this.key}) : super(key: key);

View File

@@ -17,7 +17,7 @@ class ProductItem extends StatefulWidget {
final Product product;
final bool horizontal;
const ProductItem(this.product, this.business, {Key key, this.horizontal = false}) : super(key: key);
const ProductItem(this.product, this.business, {Key? key, this.horizontal = false}) : super(key: key);
@override
State<StatefulWidget> createState() => ProductItemState();

View File

@@ -20,7 +20,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

@@ -24,7 +24,7 @@ import 'shopping_cart_widget.dart';
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();

View File

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

View File

@@ -16,7 +16,7 @@ import '../../widgets/desktop/product_item.dart';
class ShopProducts extends StatefulWidget {
final dynamic data;
const ShopProducts(this.data, {Key key}): super(key: key);
const ShopProducts(this.data, {Key? key}): super(key: key);
@override
State<StatefulWidget> createState() => ShopProductsState();

View File

@@ -12,7 +12,7 @@ import '../../utils/util_io.dart' if (dart.library.html) '../../utils/util_web.d
class ShopPromote extends StatefulWidget {
final dynamic data;
const ShopPromote(this.data, {Key key}): super(key: key);
const ShopPromote(this.data, {Key? key}): super(key: key);
@override
State<StatefulWidget> createState() => ShopPromoteState();