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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user