diff --git a/lib/widgets/desktop/desktop_view_ticket.dart b/lib/widgets/desktop/desktop_view_ticket.dart index 7034f69..cca9a34 100644 --- a/lib/widgets/desktop/desktop_view_ticket.dart +++ b/lib/widgets/desktop/desktop_view_ticket.dart @@ -406,7 +406,7 @@ class DesktopViewTicketState extends State { width: mainSpace / 2, margin: EdgeInsets.only(top: 16.0, bottom: 16.0), padding: EdgeInsets.all(10.0), - child: (ticket.isClosed) ? + child: (ticket.isClosed == true) ? Column( children: [ Container( diff --git a/lib/widgets/general/add_remove_button.dart b/lib/widgets/general/add_remove_button.dart index ee96fec..7d37664 100644 --- a/lib/widgets/general/add_remove_button.dart +++ b/lib/widgets/general/add_remove_button.dart @@ -320,7 +320,7 @@ class AddRemoveButtonState extends State { textColor: Colors.white ); } else { - cartInfo.productList![widget.cartLineItemIndex].quantity += 1.0; + cartInfo.productList![widget.cartLineItemIndex].quantity = (cartInfo.productList![widget.cartLineItemIndex].quantity ?? 0) + 1.0; Utils.addSubproductQty(cartInfo, cartInfo.productList![widget.cartLineItemIndex]); store.dispatch(UpdateCartInfo( Utils.addCartInfoToCartInfoList(store.state.cartInfos, cartInfo))); @@ -384,7 +384,7 @@ class AddRemoveButtonState extends State { cartInfo.productList!.removeAt(widget.cartLineItemIndex); Utils.removeSubproduct(cartInfo, uuid); } else { - cartInfo.productList![widget.cartLineItemIndex].quantity -= 1; + cartInfo.productList![widget.cartLineItemIndex].quantity = (cartInfo.productList![widget.cartLineItemIndex].quantity ?? 0) - 1; Utils.addSubproductQty(cartInfo, cartInfo.productList![widget.cartLineItemIndex], remove: true); } if (cartInfo.productList!.length <= 0) { diff --git a/lib/widgets/general/parabolic_animation_widget.dart b/lib/widgets/general/parabolic_animation_widget.dart index 8db3dbb..3916874 100644 --- a/lib/widgets/general/parabolic_animation_widget.dart +++ b/lib/widgets/general/parabolic_animation_widget.dart @@ -69,13 +69,13 @@ class ParabolicAnimationWidget extends AnimatedWidget { RenderBox stackBox = stackKey.currentContext!.findRenderObject()! as RenderBox; Offset stackBoxOffset = stackBox.globalToLocal(Offset.zero); - EdgeInsets startMargin = _margin(startKey)!; + EdgeInsets startMargin = _margin(startKey); RenderBox startBox = startKey.currentContext!.findRenderObject()! as RenderBox; _startOffset = startBox.localToGlobal(Offset( startMargin.left + startAdjustOffset.dx, stackBoxOffset.dy + startMargin.top + startAdjustOffset.dy)); - EdgeInsets endMargin = _margin(endKey)!; + EdgeInsets endMargin = _margin(endKey); RenderBox endBox = endKey.currentContext!.findRenderObject()! as RenderBox; _endOffset = endBox.localToGlobal(Offset( endMargin.left + endAdjustOffset.dx, @@ -83,9 +83,9 @@ class ParabolicAnimationWidget extends AnimatedWidget { } } - EdgeInsetsGeometry _margin(GlobalKey key) { + EdgeInsets _margin(GlobalKey key) { final Widget widget = key.currentContext!.widget; - EdgeInsetsGeometry margin = (widget is Container) ? (widget.margin ?? EdgeInsets.zero) : EdgeInsets.zero; - return margin ?? EdgeInsets.zero; + final mg = (widget is Container) ? widget.margin : null; + return mg is EdgeInsets ? mg : EdgeInsets.zero; } } \ No newline at end of file diff --git a/lib/widgets/general/popup_animation_widget.dart b/lib/widgets/general/popup_animation_widget.dart index ccc50e7..f25405e 100644 --- a/lib/widgets/general/popup_animation_widget.dart +++ b/lib/widgets/general/popup_animation_widget.dart @@ -52,7 +52,7 @@ class PopupAnimationWidget extends AnimatedWidget { final RenderBox stackBox = stackKey.currentContext!.findRenderObject()! as RenderBox; final Offset stackBoxOffset = stackBox.globalToLocal(Offset.zero); - final EdgeInsets startMargin = _margin(startKey)!; + final EdgeInsets startMargin = _margin(startKey); final RenderBox startBox = startKey.currentContext!.findRenderObject()! as RenderBox; _startOffset = startBox.localToGlobal(Offset( @@ -61,10 +61,9 @@ class PopupAnimationWidget extends AnimatedWidget { } } - EdgeInsetsGeometry _margin(GlobalKey key) { + EdgeInsets _margin(GlobalKey key) { final Widget widget = key.currentContext!.widget; - final EdgeInsetsGeometry margin = - (widget is Container) ? widget.margin : EdgeInsets.zero; - return margin ?? EdgeInsets.zero; + final mg = (widget is Container) ? widget.margin : null; + return mg is EdgeInsets ? mg : EdgeInsets.zero; } } \ No newline at end of file diff --git a/lib/widgets/general/read_more_text.dart b/lib/widgets/general/read_more_text.dart index 5c3dc63..6b9b9b6 100644 --- a/lib/widgets/general/read_more_text.dart +++ b/lib/widgets/general/read_more_text.dart @@ -72,7 +72,7 @@ class ReadMoreTextState extends State { widget.locale ?? Localizations.localeOf(context); final colorClickableText = - widget.colorClickableText ?? Theme.of(context).accentColor; + widget.colorClickableText ?? Theme.of(context).colorScheme.secondary; TextSpan link = TextSpan( text: _readMore ? widget.trimCollapsedText : widget.trimExpandedText, diff --git a/lib/widgets/mobile/mobile_coupons.dart b/lib/widgets/mobile/mobile_coupons.dart index d41d812..7a25d5d 100644 --- a/lib/widgets/mobile/mobile_coupons.dart +++ b/lib/widgets/mobile/mobile_coupons.dart @@ -114,7 +114,7 @@ class MobileCouponsState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - coupon.store != null ? coupon.store!.name : S.of(context).general_coupon, + coupon.store != null ? coupon.store!.name! : S.of(context).general_coupon, style: TextStyle( fontSize: 20.0, fontWeight: FontWeight.bold, @@ -146,7 +146,7 @@ class MobileCouponsState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - child: !coupon.isPercentage ? + child: coupon.isPercentage != true ? Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, diff --git a/pubspec.lock b/pubspec.lock index 7447705..98a5b41 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -130,13 +130,13 @@ packages: source: hosted version: "1.19.1" cross_file: - dependency: transitive + dependency: "direct overridden" description: name: cross_file - sha256: "437b2b8da454fe1e01131f4410274fd607347325e9330f0b469ed5a204991068" + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.1+4" + version: "0.3.4+2" crypto: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 5a79249..f1ae045 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -73,6 +73,11 @@ dependencies: hive_flutter: ^1.1.0 catcher: ^0.8.0 +# cross_file 0.3.1+4 (transitive via image_picker) references UnmodifiableUint8ListView, +# which was removed in Dart 3 — override to a Dart 3-safe release for the web build. +dependency_overrides: + cross_file: 0.3.4+2 # pinned: 0.3.5+ needs Dart 3.10; 0.3.1+4 uses removed UnmodifiableUint8ListView + # Removed in Phase 2 (no null-safe release and/or zero references): # splashscreen, flappy_search_bar, searchable_dropdown, share, platform_detect, # flutter_inappwebview, countdown, gender_selection, flutter_dash,