phase3: nullable fields/methods, casts, ?.call, pinput/YoutubePlayer v5, buttonColor, dead-code removal. 72->16
This commit is contained in:
@@ -49,11 +49,11 @@ class PopupAnimationWidget extends AnimatedWidget {
|
||||
|
||||
void _calAnimation() {
|
||||
if (_startOffset == null) {
|
||||
final RenderBox stackBox = stackKey.currentContext!.findRenderObject()!;
|
||||
final RenderBox stackBox = stackKey.currentContext!.findRenderObject()! as RenderBox;
|
||||
final Offset stackBoxOffset = stackBox.globalToLocal(Offset.zero);
|
||||
|
||||
final EdgeInsets startMargin = _margin(startKey);
|
||||
final RenderBox startBox = startKey.currentContext!.findRenderObject()!;
|
||||
final EdgeInsets startMargin = _margin(startKey)!;
|
||||
final RenderBox startBox = startKey.currentContext!.findRenderObject()! as RenderBox;
|
||||
|
||||
_startOffset = startBox.localToGlobal(Offset(
|
||||
startMargin.left + popupOffset.dx,
|
||||
@@ -61,9 +61,9 @@ class PopupAnimationWidget extends AnimatedWidget {
|
||||
}
|
||||
}
|
||||
|
||||
EdgeInsets _margin(GlobalKey key) {
|
||||
EdgeInsetsGeometry _margin(GlobalKey key) {
|
||||
final Widget widget = key.currentContext!.widget;
|
||||
final EdgeInsets margin =
|
||||
final EdgeInsetsGeometry margin =
|
||||
(widget is Container) ? widget.margin : EdgeInsets.zero;
|
||||
return margin ?? EdgeInsets.zero;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user