杂货:获取设备resoution

问题描述 投票:0回答:1

有一种方法可以将设备解析为“ $高度*$宽度”?任何包装或只是弹颤音吗?

我想要设备分辨率:计算机或电话分辨率。不是浏览器或应用程序分辨率。 thanks.

flutter device resolution
1个回答
0
投票
软件包具有两个可以处理您需要的属性。

import 'dart:ui'; PlatformDispatcher.instance.views.first.physicalSize.height PlatformDispatcher.instance.views.first.physicalSize.width

运气好!

	

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.