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

@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:photo_view/photo_view.dart'; import 'package:photo_view/photo_view.dart';
class ImageViewer extends StatefulWidget { class ImageViewer extends StatefulWidget {
final Key key; final Key? key;
final ImageProvider imageProvider; final ImageProvider imageProvider;
ImageViewer(this.imageProvider, {this.key}) : ImageViewer(this.imageProvider, {this.key}) :

View File

@@ -10,7 +10,7 @@ class AttributeSelection extends StatelessWidget {
final Business business; final Business business;
final GlobalKey startKey; final GlobalKey startKey;
const AttributeSelection({Key key, this.product, this.business, this.startKey}) : super(key: key); const AttributeSelection({Key? key, this.product, this.business, this.startKey}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -8,7 +8,7 @@ import '../widgets/desktop/desktop_blog.dart';
import '../widgets/mobile/mobile_blog.dart'; import '../widgets/mobile/mobile_blog.dart';
class Blog extends StatelessWidget { class Blog extends StatelessWidget {
final Key key; final Key? key;
final int businessId; final int businessId;
const Blog({this.key, int businessId}) : const Blog({this.key, int businessId}) :

View File

@@ -22,7 +22,7 @@ class BuyService extends StatefulWidget {
final String domain; final String domain;
final int sid; final int sid;
const BuyService(this.gid, this.serviceName, {Key key, this.domain, this.sid = 0}) : const BuyService(this.gid, this.serviceName, {Key? key, this.domain, this.sid = 0}) :
super(key: key); super(key: key);
@override @override

View File

@@ -15,7 +15,7 @@ import '../widgets/mobile/mobile_change_mobile_or_email.dart';
class ChangeMobileOrEmail extends StatelessWidget { class ChangeMobileOrEmail extends StatelessWidget {
final bool isMobile; final bool isMobile;
const ChangeMobileOrEmail(this.isMobile, {Key key}) : super(key: key); const ChangeMobileOrEmail(this.isMobile, {Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -11,7 +11,7 @@ import '../widgets/mobile/mobile_checkout.dart';
class Checkout extends StatelessWidget { class Checkout extends StatelessWidget {
final int businessId; final int businessId;
const Checkout(this.businessId, {Key key}) : const Checkout(this.businessId, {Key? key}) :
super(key: key); super(key: key);
@override @override

View File

@@ -14,7 +14,7 @@ import '../widgets/mobile/mobile_contact_us.dart';
class ContactUs extends StatefulWidget { class ContactUs extends StatefulWidget {
final int businessId; final int businessId;
const ContactUs({this.businessId, Key key}) : const ContactUs({this.businessId, Key? key}) :
super(key: key); super(key: key);
@override @override

View File

@@ -10,7 +10,7 @@ import '../widgets/mobile/mobile_coupons.dart';
class Coupons extends StatelessWidget { class Coupons extends StatelessWidget {
final int contactId; final int contactId;
const Coupons(this.contactId, {Key key}) : const Coupons(this.contactId, {Key? key}) :
super(key: key); super(key: key);

View File

@@ -11,7 +11,7 @@ import '../widgets/mobile/create_online_store_1.dart' as mobile;
class CreateOnlineStore1 extends StatefulWidget { class CreateOnlineStore1 extends StatefulWidget {
const CreateOnlineStore1({Key key}) : const CreateOnlineStore1({Key? key}) :
super(key: key); super(key: key);
@override @override

View File

@@ -13,7 +13,7 @@ import '../widgets/general/navigationbar.dart';
import '../widgets/mobile/MobileBottomNav.dart'; import '../widgets/mobile/MobileBottomNav.dart';
class EditAddress extends StatelessWidget { class EditAddress extends StatelessWidget {
final Key key; final Key? key;
final Address address; final Address address;
final int businessId; final int businessId;
const EditAddress(this.address, {this.key, int businessId}) : const EditAddress(this.address, {this.key, int businessId}) :

View File

@@ -12,7 +12,7 @@ import '../widgets/general/navigationbar.dart';
import '../widgets/mobile/MobileBottomNav.dart'; import '../widgets/mobile/MobileBottomNav.dart';
class ForgotPassword extends StatelessWidget { class ForgotPassword extends StatelessWidget {
const ForgotPassword({Key key}) : super(key: key); const ForgotPassword({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -16,7 +16,7 @@ import '../widgets/mobile/MobileBottomNav.dart';
import '../widgets/mobile/mobile_igoshow_learn_more.dart'; import '../widgets/mobile/mobile_igoshow_learn_more.dart';
class IGoShowLearnMore extends StatefulWidget { class IGoShowLearnMore extends StatefulWidget {
const IGoShowLearnMore({Key key}) : super(key: key); const IGoShowLearnMore({Key? key}) : super(key: key);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {

View File

@@ -14,7 +14,7 @@ import '../widgets/mobile/MobileBottomNav.dart';
import '../widgets/mobile/mobile_login.dart'; import '../widgets/mobile/mobile_login.dart';
class Login extends StatefulWidget { class Login extends StatefulWidget {
final Key key; final Key? key;
const Login({this.key}) : super(key: key); const Login({this.key}) : super(key: key);

View File

@@ -15,7 +15,7 @@ import '../widgets/mobile/MobileBottomNav.dart';
import '../widgets/mobile/mobile_me.dart'; import '../widgets/mobile/mobile_me.dart';
class Me extends StatefulWidget { class Me extends StatefulWidget {
final Key key; final Key? key;
const Me({this.key}) : super(key: key); const Me({this.key}) : super(key: key);

View File

@@ -16,7 +16,7 @@ import '../widgets/mobile/MobileBottomNav.dart';
import '../widgets/mobile/mobile_minipos_learn_more.dart'; import '../widgets/mobile/mobile_minipos_learn_more.dart';
class MiniPosLearnMore extends StatefulWidget { class MiniPosLearnMore extends StatefulWidget {
const MiniPosLearnMore({Key key}) : super(key: key); const MiniPosLearnMore({Key? key}) : super(key: key);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {

View File

@@ -8,7 +8,7 @@ import '../widgets/desktop/desktop_my_addresses.dart';
import '../widgets/mobile/mobile_my_addresses.dart'; import '../widgets/mobile/mobile_my_addresses.dart';
class MyAddresses extends StatelessWidget { class MyAddresses extends StatelessWidget {
final Key key; final Key? key;
final int businessId; final int businessId;
const MyAddresses({this.key, int businessId}) : const MyAddresses({this.key, int businessId}) :

View File

@@ -8,7 +8,7 @@ import '../widgets/desktop/desktop_my_support.dart';
import '../widgets/mobile/mobile_my_support.dart'; import '../widgets/mobile/mobile_my_support.dart';
class MySupport extends StatelessWidget { class MySupport extends StatelessWidget {
final Key key; final Key? key;
final int businessId; final int businessId;
const MySupport({this.key, int businessId}) : const MySupport({this.key, int businessId}) :

View File

@@ -7,7 +7,7 @@ import '../widgets/desktop/desktop_new_address.dart';
import '../widgets/mobile/mobile_new_address.dart'; import '../widgets/mobile/mobile_new_address.dart';
class NewAddress extends StatelessWidget { class NewAddress extends StatelessWidget {
final Key key; final Key? key;
final LocatedAddress locatedAddress; final LocatedAddress locatedAddress;
final int businessId; final int businessId;
const NewAddress({this.key, this.locatedAddress, this.businessId}) : super(key: key); const NewAddress({this.key, this.locatedAddress, this.businessId}) : super(key: key);

View File

@@ -10,7 +10,7 @@ import '../widgets/mobile/mobile_new_comment.dart';
class NewComment extends StatelessWidget { class NewComment extends StatelessWidget {
final int orderId; final int orderId;
const NewComment(this.orderId, {Key key}) : const NewComment(this.orderId, {Key? key}) :
super(key: key); super(key: key);

View File

@@ -14,7 +14,7 @@ import '../widgets/mobile/MobileBottomNav.dart';
import '../widgets/mobile/mobile_new_ticket.dart'; import '../widgets/mobile/mobile_new_ticket.dart';
class NewTicket extends StatefulWidget { class NewTicket extends StatefulWidget {
final Key key; final Key? key;
final int businessId; final int businessId;
const NewTicket({this.key, int businessId}) : const NewTicket({this.key, int businessId}) :

View File

@@ -12,7 +12,7 @@ import '../widgets/mobile/MobileBottomNav.dart';
import '../widgets/mobile/mobile_new_user.dart'; import '../widgets/mobile/mobile_new_user.dart';
class NewUser extends StatelessWidget { class NewUser extends StatelessWidget {
const NewUser({Key key}) : super(key: key); const NewUser({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -11,7 +11,7 @@ class OrderDetail extends StatelessWidget {
final int orderId; final int orderId;
final bool fromOrders; final bool fromOrders;
const OrderDetail(this.orderId, {this.fromOrders = false, Key key}) : const OrderDetail(this.orderId, {this.fromOrders = false, Key? key}) :
super(key: key); super(key: key);
@override @override

View File

@@ -10,7 +10,7 @@ import '../widgets/mobile/mobile_pay_now.dart';
class PayNow extends StatelessWidget { class PayNow extends StatelessWidget {
final int orderId; final int orderId;
const PayNow(this.orderId, {Key key}) : const PayNow(this.orderId, {Key? key}) :
super(key: key); super(key: key);

View File

@@ -15,7 +15,7 @@ class PlainPage extends StatefulWidget {
final int businessId; final int businessId;
final String slug; final String slug;
const PlainPage(this.slug, {this.businessId, Key key}) : const PlainPage(this.slug, {this.businessId, Key? key}) :
super(key: key); super(key: key);
@override @override

View File

@@ -13,7 +13,7 @@ class ProductDetailPage extends StatelessWidget {
final Business business; final Business business;
final Product product; final Product product;
const ProductDetailPage({this.business, this.product, Key key}) : const ProductDetailPage({this.business, this.product, Key? key}) :
super(key: key); super(key: key);

View File

@@ -9,7 +9,7 @@ import '../widgets/mobile/product_search.dart' as mobile;
class ProductSearch extends StatelessWidget { class ProductSearch extends StatelessWidget {
final Business business; final Business business;
const ProductSearch(this.business, {Key key}) : super(key: key); const ProductSearch(this.business, {Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -12,7 +12,7 @@ import '../widgets/mobile/mobile_renew_license.dart';
class RenewLicense extends StatefulWidget { class RenewLicense extends StatefulWidget {
const RenewLicense({Key key}) : const RenewLicense({Key? key}) :
super(key: key); super(key: key);
@override @override

View File

@@ -17,7 +17,7 @@ import '../widgets/mobile/mobile_renew_license.dart';
class RenewMiniOffice extends StatefulWidget { class RenewMiniOffice extends StatefulWidget {
final int gid; final int gid;
const RenewMiniOffice(this.gid, {Key key}) : const RenewMiniOffice(this.gid, {Key? key}) :
super(key: key); super(key: key);
@override @override

View File

@@ -14,7 +14,7 @@ import '../widgets/mobile/mobile_reset_password.dart';
class ResetPassword extends StatelessWidget { class ResetPassword extends StatelessWidget {
final String mobile; final String mobile;
final String code; final String code;
const ResetPassword(this.mobile, {Key key, this.code}) : super(key: key); const ResetPassword(this.mobile, {Key? key, this.code}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -5,7 +5,7 @@ import '../widgets/mobile/mobile_search_place.dart';
import 'package:responsive_builder/responsive_builder.dart'; import 'package:responsive_builder/responsive_builder.dart';
class SearchPlace extends StatelessWidget { class SearchPlace extends StatelessWidget {
final Key key; final Key? key;
final int businessId; final int businessId;
const SearchPlace(this.businessId, {this.key}) : super(key: key); const SearchPlace(this.businessId, {this.key}) : super(key: key);

View File

@@ -14,7 +14,7 @@ import '../widgets/mobile/mobile_set_password.dart';
class SetPassword extends StatelessWidget { class SetPassword extends StatelessWidget {
final String mobile; final String mobile;
final String code; final String code;
const SetPassword(this.mobile, {Key key, this.code}) : super(key: key); const SetPassword(this.mobile, {Key? key, this.code}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -10,7 +10,7 @@ import '../widgets/mobile/shop.dart' as mobile;
class Shop extends StatefulWidget { class Shop extends StatefulWidget {
final int businessId; final int businessId;
const Shop({this.businessId, Key key}) : super(key: key); const Shop({this.businessId, Key? key}) : super(key: key);
@override @override
State<StatefulWidget> createState() => ShopState(); State<StatefulWidget> createState() => ShopState();

View File

@@ -15,7 +15,7 @@ import '../widgets/mobile/mobile_store_product_search.dart';
class StoreProductSearch extends StatelessWidget { class StoreProductSearch extends StatelessWidget {
final Business business; final Business business;
const StoreProductSearch(this.business, {Key key}) : super(key: key); const StoreProductSearch(this.business, {Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -13,7 +13,7 @@ import '../widgets/mobile/MobileBottomNav.dart';
import '../widgets/mobile/mobile_user_profile.dart'; import '../widgets/mobile/mobile_user_profile.dart';
class UserProfile extends StatelessWidget { class UserProfile extends StatelessWidget {
const UserProfile({Key key}) : super(key: key); const UserProfile({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -14,7 +14,7 @@ import '../widgets/mobile/MobileBottomNav.dart';
import '../widgets/mobile/mobile_view_blog.dart'; import '../widgets/mobile/mobile_view_blog.dart';
class ViewBlog extends StatefulWidget { class ViewBlog extends StatefulWidget {
final Key key; final Key? key;
final int bid; final int bid;
const ViewBlog(this.bid, {this.key}) : super(key: key); const ViewBlog(this.bid, {this.key}) : super(key: key);

View File

@@ -14,7 +14,7 @@ import '../widgets/mobile/MobileBottomNav.dart';
import '../widgets/mobile/mobile_view_ticket.dart'; import '../widgets/mobile/mobile_view_ticket.dart';
class ViewTicket extends StatefulWidget { class ViewTicket extends StatefulWidget {
final Key key; final Key? key;
final int ticketId; final int ticketId;
const ViewTicket(this.ticketId, {this.key}) : super(key: key); const ViewTicket(this.ticketId, {this.key}) : super(key: key);

View File

@@ -21,7 +21,7 @@ class DoubleBackToCloseApp extends StatefulWidget {
/// Creates a widget that allows the user to close the app by double tapping /// Creates a widget that allows the user to close the app by double tapping
/// the back-button. /// the back-button.
const DoubleBackToCloseApp({ const DoubleBackToCloseApp({
Key key, Key? key,
@required this.snackBar, @required this.snackBar,
@required this.child, @required this.child,
}) : assert(snackBar != null), }) : assert(snackBar != null),

View File

@@ -38,7 +38,7 @@ class ShopScrollController extends ScrollController {
final bool keepScrollOffset; final bool keepScrollOffset;
/// [toString]输出中使用的标签。 旨在帮助在调试输出中标识滚动控制器实例。 /// [toString]输出中使用的标签。 旨在帮助在调试输出中标识滚动控制器实例。
final String debugLabel; final String? debugLabel;
/// The currently attached positions. 当前附加的 [positions]。 /// The currently attached positions. 当前附加的 [positions]。
/// 这不应直接突变。 可以使用[attach]和[detach]添加和删除[ScrollPosition]对象。 /// 这不应直接突变。 可以使用[attach]和[detach]添加和删除[ScrollPosition]对象。
@@ -61,7 +61,7 @@ class ShopScrollController extends ScrollController {
'ScrollController not attached to any scroll views.'); 'ScrollController not attached to any scroll views.');
assert(_positions.length == 1, assert(_positions.length == 1,
'ScrollController attached to multiple scroll views.'); 'ScrollController attached to multiple scroll views.');
return _positions.single; return _positions.single as ShopScrollPosition;
} }
/// 可滚动小部件的当前滚动偏移量 /// 可滚动小部件的当前滚动偏移量
@@ -83,12 +83,12 @@ class ShopScrollController extends ScrollController {
/// 持续时间不能为零。 要在没有动画的情况下跳至特定值,请使用[jumpTo]。 /// 持续时间不能为零。 要在没有动画的情况下跳至特定值,请使用[jumpTo]。
Future<void> animateTo( Future<void> animateTo(
double offset, { double offset, {
@required Duration duration, required Duration duration,
@required Curve curve, required Curve curve,
}) { }) {
assert(_positions.isNotEmpty, assert(_positions.isNotEmpty,
'ScrollController not attached to any scroll views.'); 'ScrollController not attached to any scroll views.');
final List<Future<void>> animations = List<Future<void>>(_positions.length); final List<Future<void>> animations = List<Future<void>>.filled(_positions.length, Future<void>.value());
for (int i = 0; i < _positions.length; i += 1) for (int i = 0; i < _positions.length; i += 1)
animations[i] = animations[i] =
_positions[i].animateTo(offset, duration: duration, curve: curve); _positions[i].animateTo(offset, duration: duration, curve: curve);
@@ -149,7 +149,7 @@ class ShopScrollController extends ScrollController {
/// 则它将是前一个实例。 当环境已更改并且[Scrollable]需要重新创建[ScrollPosition] /// 则它将是前一个实例。 当环境已更改并且[Scrollable]需要重新创建[ScrollPosition]
/// 对象时,将使用此方法。 第一次创建[ScrollPosition]时为null。 /// 对象时,将使用此方法。 第一次创建[ScrollPosition]时为null。
ScrollPosition createScrollPosition(ScrollPhysics physics, ScrollPosition createScrollPosition(ScrollPhysics physics,
ScrollContext context, ScrollPosition oldPosition) { ScrollContext context, ScrollPosition? oldPosition) {
return ShopScrollPosition( return ShopScrollPosition(
coordinator: coordinator, coordinator: coordinator,
physics: physics, physics: physics,
@@ -175,7 +175,7 @@ class ShopScrollController extends ScrollController {
@mustCallSuper @mustCallSuper
void debugFillDescription(List<String> description) { void debugFillDescription(List<String> description) {
super.debugFillDescription(description); super.debugFillDescription(description);
if (debugLabel != null) description.add(debugLabel); if (debugLabel != null) description.add(debugLabel!);
if (initialScrollOffset != 0.0) if (initialScrollOffset != 0.0)
description.add( description.add(
'initialScrollOffset: ${initialScrollOffset.toStringAsFixed(1)}, '); 'initialScrollOffset: ${initialScrollOffset.toStringAsFixed(1)}, ');

View File

@@ -12,15 +12,15 @@ class ShopScrollCoordinator {
/// 页面主 CustomScrollView 控制 /// 页面主 CustomScrollView 控制
final String pageLabel = "page"; final String pageLabel = "page";
ShopScrollController _pageScrollController; late ShopScrollController _pageScrollController;
double Function() pinnedHeaderSliverHeightBuilder; double Function()? pinnedHeaderSliverHeightBuilder;
ShopScrollPosition get _pageScrollPosition => _pageScrollController.position; ShopScrollPosition get _pageScrollPosition => _pageScrollController.position;
ScrollDragController scrollDragController; late ScrollDragController scrollDragController;
/// 主页面滑动部件默认位置 /// 主页面滑动部件默认位置
double _pageInitialOffset; late double _pageInitialOffset;
/// 获取主页面滑动控制器 /// 获取主页面滑动控制器
ShopScrollController pageScrollController([double initialOffset = 0.0]) { ShopScrollController pageScrollController([double initialOffset = 0.0]) {
@@ -32,26 +32,26 @@ class ShopScrollCoordinator {
} }
/// 创建并获取一个子滑动控制器 /// 创建并获取一个子滑动控制器
ShopScrollController newChildScrollController([String debugLabel]) => ShopScrollController newChildScrollController([String? debugLabel]) =>
ShopScrollController(this, debugLabel: debugLabel); ShopScrollController(this, debugLabel: debugLabel);
/// 子部件滑动数据协调 /// 子部件滑动数据协调
/// [userScrollDirection]用户滑动方向 /// [userScrollDirection]用户滑动方向
/// [position]被滑动的子部件的位置信息 /// [position]被滑动的子部件的位置信息
void applyUserOffset(double delta, void applyUserOffset(double delta,
[ScrollDirection userScrollDirection, ShopScrollPosition position]) { [ScrollDirection? userScrollDirection, ShopScrollPosition? position]) {
if (userScrollDirection == ScrollDirection.reverse) { if (userScrollDirection == ScrollDirection.reverse) {
updateUserScrollDirection(_pageScrollPosition, userScrollDirection); updateUserScrollDirection(_pageScrollPosition, userScrollDirection!);
final innerDelta = _pageScrollPosition.applyClampedDragUpdate(delta); final innerDelta = _pageScrollPosition.applyClampedDragUpdate(delta);
if (innerDelta != 0.0) { if (innerDelta != 0.0) {
updateUserScrollDirection(position, userScrollDirection); updateUserScrollDirection(position!, userScrollDirection);
position.applyFullDragUpdate(innerDelta); position.applyFullDragUpdate(innerDelta);
} }
} else { } else {
updateUserScrollDirection(position, userScrollDirection); updateUserScrollDirection(position!, userScrollDirection!);
final outerDelta = position.applyClampedDragUpdate(delta); final outerDelta = position.applyClampedDragUpdate(delta);
if (outerDelta != 0.0) { if (outerDelta != 0.0) {
updateUserScrollDirection(_pageScrollPosition, userScrollDirection); updateUserScrollDirection(_pageScrollPosition, userScrollDirection!);
_pageScrollPosition.applyFullDragUpdate(outerDelta); _pageScrollPosition.applyFullDragUpdate(outerDelta);
} }
} }
@@ -60,7 +60,7 @@ class ShopScrollCoordinator {
bool applyContentDimensions(double minScrollExtent, double maxScrollExtent, bool applyContentDimensions(double minScrollExtent, double maxScrollExtent,
ShopScrollPosition position) { ShopScrollPosition position) {
if (pinnedHeaderSliverHeightBuilder != null) { if (pinnedHeaderSliverHeightBuilder != null) {
maxScrollExtent = maxScrollExtent - pinnedHeaderSliverHeightBuilder(); maxScrollExtent = maxScrollExtent - pinnedHeaderSliverHeightBuilder!();
maxScrollExtent = math.max(0.0, maxScrollExtent); maxScrollExtent = math.max(0.0, maxScrollExtent);
} }
return position.applyContentDimensions( return position.applyContentDimensions(

View File

@@ -11,17 +11,17 @@ import 'shop_scroll_coordinator.dart';
class ShopScrollPosition extends ScrollPosition class ShopScrollPosition extends ScrollPosition
implements ScrollActivityDelegate { implements ScrollActivityDelegate {
final ShopScrollCoordinator coordinator; // 协调器 final ShopScrollCoordinator coordinator; // 协调器
ScrollDragController _currentDrag; ScrollDragController? _currentDrag;
double _heldPreviousVelocity = 0.0; double _heldPreviousVelocity = 0.0;
ShopScrollPosition( ShopScrollPosition(
{@required ScrollPhysics physics, {required ScrollPhysics physics,
@required ScrollContext context, required ScrollContext context,
double initialPixels = 0.0, double initialPixels = 0.0,
bool keepScrollOffset = true, bool keepScrollOffset = true,
ScrollPosition oldPosition, ScrollPosition? oldPosition,
String debugLabel, String? debugLabel,
@required this.coordinator}) required this.coordinator})
: super( : super(
physics: physics, physics: physics,
context: context, context: context,
@@ -40,7 +40,7 @@ class ShopScrollPosition extends ScrollPosition
@override @override
double setPixels(double newPixels) { double setPixels(double newPixels) {
assert(activity.isScrolling); assert(activity!.isScrolling);
return super.setPixels(newPixels); return super.setPixels(newPixels);
} }
@@ -51,13 +51,13 @@ class ShopScrollPosition extends ScrollPosition
goIdle(); goIdle();
return; return;
} }
activity.updateDelegate(this); activity!.updateDelegate(this);
final ShopScrollPosition typedOther = other as ShopScrollPosition; final ShopScrollPosition typedOther = other as ShopScrollPosition;
_userScrollDirection = typedOther._userScrollDirection; _userScrollDirection = typedOther._userScrollDirection;
assert(_currentDrag == null); assert(_currentDrag == null);
if (typedOther._currentDrag != null) { if (typedOther._currentDrag != null) {
_currentDrag = typedOther._currentDrag; _currentDrag = typedOther._currentDrag;
_currentDrag.updateDelegate(this); _currentDrag!.updateDelegate(this);
typedOther._currentDrag = null; typedOther._currentDrag = null;
} }
} }
@@ -131,14 +131,14 @@ class ShopScrollPosition extends ScrollPosition
} }
@override @override
void beginActivity(ScrollActivity newActivity) { void beginActivity(ScrollActivity? newActivity) {
_heldPreviousVelocity = 0.0; _heldPreviousVelocity = 0.0;
if (newActivity == null) return; if (newActivity == null) return;
assert(newActivity.delegate == this); assert(newActivity.delegate == this);
super.beginActivity(newActivity); super.beginActivity(newActivity);
_currentDrag?.dispose(); _currentDrag?.dispose();
_currentDrag = null; _currentDrag = null;
if (!activity.isScrolling) updateUserScrollDirection(ScrollDirection.idle); if (!activity!.isScrolling) updateUserScrollDirection(ScrollDirection.idle);
} }
/// 将[用户滚动方向]设置为给定值。 /// 将[用户滚动方向]设置为给定值。
@@ -154,7 +154,7 @@ class ShopScrollPosition extends ScrollPosition
@override @override
ScrollHoldController hold(VoidCallback holdCancelCallback) { ScrollHoldController hold(VoidCallback holdCancelCallback) {
final double previousVelocity = activity.velocity; final double previousVelocity = activity!.velocity;
final HoldScrollActivity holdActivity = final HoldScrollActivity holdActivity =
HoldScrollActivity(delegate: this, onHoldCanceled: holdCancelCallback); HoldScrollActivity(delegate: this, onHoldCanceled: holdCancelCallback);
beginActivity(holdActivity); beginActivity(holdActivity);
@@ -195,10 +195,10 @@ class ShopScrollPosition extends ScrollPosition
if (coordinator.pageExpand == PageExpandState.Expanding) return; if (coordinator.pageExpand == PageExpandState.Expanding) return;
} }
assert(pixels != null); assert(pixels != null);
final Simulation simulation = final Simulation? simulation =
physics.createBallisticSimulation(this, velocity); physics.createBallisticSimulation(this, velocity);
if (simulation != null) { if (simulation != null) {
beginActivity(BallisticScrollActivity(this, simulation, context.vsync)); beginActivity(BallisticScrollActivity(this, simulation, context.vsync, false));
} else { } else {
goIdle(); goIdle();
} }
@@ -220,8 +220,8 @@ class ShopScrollPosition extends ScrollPosition
@override @override
Future<void> animateTo( Future<void> animateTo(
double to, { double to, {
@required Duration duration, required Duration duration,
@required Curve curve, required Curve curve,
}) { }) {
if (nearEqual(to, pixels, physics.tolerance.distance)) { if (nearEqual(to, pixels, physics.tolerance.distance)) {
// 跳过动画,直接移到我们已经靠近的位置。 // 跳过动画,直接移到我们已经靠近的位置。

View File

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

View File

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

View File

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

View File

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

View File

@@ -34,7 +34,7 @@ import '../../utils/utils.dart';
import '../../widgets/general/sliding_up_panel.dart'; import '../../widgets/general/sliding_up_panel.dart';
class DesktopCheckout extends StatefulWidget { class DesktopCheckout extends StatefulWidget {
final Key key; final Key? key;
final int businessId; final int businessId;
const DesktopCheckout(this.businessId, {this.key,}) : super(key: key); 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 { class DesktopContactUs extends StatefulWidget {
final Business business; final Business business;
const DesktopContactUs(this.business, {Key key}) : super(key: key); const DesktopContactUs(this.business, {Key? key}) : super(key: key);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {

View File

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

View File

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

View File

@@ -20,7 +20,7 @@ import '../../utils/utils.dart';
import '../../widgets/general/navigationbar.dart'; import '../../widgets/general/navigationbar.dart';
class DesktopEditAddress extends StatefulWidget { class DesktopEditAddress extends StatefulWidget {
final Key key; final Key? key;
final Address address; final Address address;
final int businessId; final int businessId;
const DesktopEditAddress(this.address, {this.key, 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'; import '../../utils/utils.dart';
class DesktopForgotPassword extends StatefulWidget { class DesktopForgotPassword extends StatefulWidget {
const DesktopForgotPassword({Key key}) : super(key: key); const DesktopForgotPassword({Key? key}) : super(key: key);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -14,7 +14,7 @@ import '../../utils/http_util.dart';
import '../../widgets/general/navigationbar.dart'; import '../../widgets/general/navigationbar.dart';
class DesktopNewAddress extends StatefulWidget { class DesktopNewAddress extends StatefulWidget {
final Key key; final Key? key;
final LocatedAddress locatedAddress; final LocatedAddress locatedAddress;
final int businessId; final int businessId;
const DesktopNewAddress({this.key, this.locatedAddress, this.businessId}) : super(key: key); 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 { class DesktopNewComment extends StatefulWidget {
final Key key; final Key? key;
final int orderId; final int orderId;
const DesktopNewComment(this.orderId, {this.key}); 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'; import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
class DesktopNewTicket extends StatefulWidget { class DesktopNewTicket extends StatefulWidget {
final Key key; final Key? key;
final int businessId; final int businessId;
const DesktopNewTicket({this.key, int businessId}) : const DesktopNewTicket({this.key, int businessId}) :

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -17,7 +17,7 @@ class DesktopProductItem extends StatefulWidget {
final Business business; final Business business;
final bool horizontal; 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); : super(key: key);
@override @override

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -19,7 +19,7 @@ import '../../utils/utils.dart';
import '../../widgets/general/add_remove_button.dart'; import '../../widgets/general/add_remove_button.dart';
class DesktopStoreProductSearch extends StatefulWidget { class DesktopStoreProductSearch extends StatefulWidget {
final Key key; final Key? key;
final Business business; final Business business;
const DesktopStoreProductSearch(this.business, {this.key}); 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'; import '../../utils/utils.dart';
class DesktopUserProfile extends StatefulWidget { class DesktopUserProfile extends StatefulWidget {
final Key key; final Key? key;
const DesktopUserProfile({this.key}) const DesktopUserProfile({this.key})
: super(key: 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'; import '../../utils/util_io.dart' if (dart.library.html) '../../utils/util_web.dart';
class DesktopViewBlog extends StatefulWidget { class DesktopViewBlog extends StatefulWidget {
final Key key; final Key? key;
final int bid; final int bid;
const DesktopViewBlog(this.bid, {this.key}) : super(key: key); 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'; import '../../widgets/general/text_link.dart';
class DesktopViewTicket extends StatefulWidget { class DesktopViewTicket extends StatefulWidget {
final Key key; final Key? key;
final int ticketId; final int ticketId;
const DesktopViewTicket(this.ticketId, {this.key}) : super(key: key); const DesktopViewTicket(this.ticketId, {this.key}) : super(key: key);

View File

@@ -17,7 +17,7 @@ class ProductItem extends StatefulWidget {
final Product product; final Product product;
final bool horizontal; 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 @override
State<StatefulWidget> createState() => ProductItemState(); State<StatefulWidget> createState() => ProductItemState();

View File

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

View File

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

View File

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

View File

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

View File

@@ -102,7 +102,7 @@ class CarouselState extends State<Carousel> {
} }
class Indicator extends StatefulWidget { class Indicator extends StatefulWidget {
Indicator({Key key, int count}) Indicator({Key? key, int count})
: count = count, : count = count,
super(key: key); super(key: key);

View File

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

View File

@@ -1,3 +1,4 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// 自定义实现,替代已停维的 `hovering` 包的 [HoverWidget]。 /// 自定义实现,替代已停维的 `hovering` 包的 [HoverWidget]。

View File

@@ -7,7 +7,7 @@ import 'package:responsive_builder/responsive_builder.dart';
class IndexCarousel extends StatelessWidget { class IndexCarousel extends StatelessWidget {
final List<Gallery> galleries; final List<Gallery> galleries;
const IndexCarousel(this.galleries, {Key key}) : super(key: key); const IndexCarousel(this.galleries, {Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -6,7 +6,7 @@ import 'package:responsive_builder/responsive_builder.dart';
class IndexMainContent1 extends StatelessWidget { class IndexMainContent1 extends StatelessWidget {
final String message; final String message;
const IndexMainContent1(this.message, {Key key}) : super(key: key); const IndexMainContent1(this.message, {Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -6,7 +6,7 @@ import 'package:responsive_builder/responsive_builder.dart';
class IndexMainContent2 extends StatelessWidget { class IndexMainContent2 extends StatelessWidget {
final Map<String, dynamic> content; final Map<String, dynamic> content;
const IndexMainContent2(this.content, {Key key}) : super(key: key); const IndexMainContent2(this.content, {Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -6,7 +6,7 @@ import 'package:responsive_builder/responsive_builder.dart';
class IndexMainContent3 extends StatelessWidget { class IndexMainContent3 extends StatelessWidget {
final Map<String, dynamic> content; final Map<String, dynamic> content;
const IndexMainContent3(this.content, {Key key}) : super(key: key); const IndexMainContent3(this.content, {Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
import '../../constants.dart'; import '../../constants.dart';
class NavigationBarLogo extends StatelessWidget { class NavigationBarLogo extends StatelessWidget {
const NavigationBarLogo({Key key}) : super(key: key); const NavigationBarLogo({Key? key}) : super(key: key);
static const IconData logoData = IconData( static const IconData logoData = IconData(
Constants.FONT_WISETRONIC, Constants.FONT_WISETRONIC,

View File

@@ -12,7 +12,7 @@ typedef OnCodeVerified();
typedef OnCancel(); typedef OnCancel();
class PaymentVerificationCodeDialog extends StatefulWidget { class PaymentVerificationCodeDialog extends StatefulWidget {
final Key key; final Key? key;
final User user; final User user;
final OnCodeVerified onCodeVerified; final OnCodeVerified onCodeVerified;
final OnCancel onCancel; final OnCancel onCancel;

View File

@@ -9,7 +9,7 @@ enum TrimMode {
class ReadMoreText extends StatefulWidget { class ReadMoreText extends StatefulWidget {
const ReadMoreText( const ReadMoreText(
this.data, { this.data, {
Key key, Key? key,
this.trimExpandedText = ' read less', this.trimExpandedText = ' read less',
this.trimCollapsedText = ' ...read more', this.trimCollapsedText = ' ...read more',
this.colorClickableText, this.colorClickableText,

View File

@@ -164,7 +164,7 @@ class SlidingUpPanel extends StatefulWidget {
final PanelState defaultPanelState; final PanelState defaultPanelState;
SlidingUpPanel({ SlidingUpPanel({
Key key, Key? key,
this.panel, this.panel,
this.panelBuilder, this.panelBuilder,
this.body, this.body,

View File

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

View File

@@ -19,7 +19,7 @@ import '../../widgets/general/attribute/radio_options.dart';
class MobileAttributeSelection extends StatefulWidget { class MobileAttributeSelection extends StatefulWidget {
final Product product; final Product product;
final Business business; final Business business;
final Key key; final Key? key;
final GlobalKey startKey; 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})

View File

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

View File

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

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More