print("物理尺寸:${window.physicalSize}");
print("逻辑尺寸:${MediaQuery.of(context).size}");
final width = window.physicalSize.width / window.devicePixelRatio;
final height = window.physicalSize.height / window.devicePixelRatio;
print("逻辑宽度${width}");
print("逻辑宽度${height}");
final top = window.padding.top / window.devicePixelRatio;
print("状态栏高度${top}");
print(MediaQuery.of(context).padding.bottom);
网友评论