phase3: WEB BUILD SUCCEEDS. cross_file override (0.3.4+2, Dart3-safe), parabolic/popup _margin EdgeInsets, remaining nullable fixes. lib 12->6(util_io deferred), web build OK with --no-tree-shake-icons
This commit is contained in:
@@ -406,7 +406,7 @@ class DesktopViewTicketState extends State<DesktopViewTicket> {
|
||||
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(
|
||||
|
||||
@@ -320,7 +320,7 @@ class AddRemoveButtonState extends State<AddRemoveButton> {
|
||||
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<AddRemoveButton> {
|
||||
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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ class ReadMoreTextState extends State<ReadMoreText> {
|
||||
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,
|
||||
|
||||
@@ -114,7 +114,7 @@ class MobileCouponsState extends State<MobileCoupons> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
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<MobileCoupons> {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: !coupon.isPercentage ?
|
||||
child: coupon.isPercentage != true ?
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
Reference in New Issue
Block a user