phase3: nullable fields/methods, casts, ?.call, pinput/YoutubePlayer v5, buttonColor, dead-code removal. 72->16

This commit is contained in:
2026-08-01 01:21:37 +08:00
parent 137eca4c69
commit 7c69197396
39 changed files with 107 additions and 113 deletions

View File

@@ -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;
}