Flutter响应式文本

huangapple go评论86阅读模式
英文:

Flutter Responsive text

问题

我想在我的应用程序中使用flutter_screenutil包来获取响应式文本。

他们要求我提供我的测试设备的designSize。当我访问这个网站Whatismyandroidversion时,我得到两个值。我得到屏幕尺寸=7201600和CSS视口尺寸=385854?我应该使用哪一个作为我的designSize?

英文:

I want to use this flutter_screenutil package to get responsive text in my app.

And they require the designSize of my test device. When I go to this site Whatsmyandroid version, I get two values. I get two sizes, the screen size = 720*1600 and css viewport size as 385 * 854? Which one do i use as my designSize?

答案1

得分: 0

根据 GitHub 问题;

> 大小 (360, 690) 指的是 UI 设计中设备的大小草稿,单位是 dp。您可以根据自己的设计草稿填写设备的大小。与实际设备大小无关

(360, 690) 指的是 dp,而不是实际分辨率。更多信息请参考;px、dip、dp 和 sp 之间有什么区别?

英文:

According to this GitHub issue;

> Size (360, 690) refers to the size of the device in the UI design
> draft, and the unit is dp. You can fill in the size of the device in
> your own design draft. Has nothing to do with the actual device size

The (360, 690) refers to dp, not actual resolution. For more info; What is the difference between px, dip, dp, and sp?.

huangapple
  • 本文由 发表于 2023年8月5日 14:42:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76840445.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定