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