Code Monkey home page Code Monkey logo

Comments (3)

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

假设你设计稿 是 200200的屏幕 上 26px
你手机是 400
400的屏幕, 那面ScreenUtil().setSp(26)} 在这个手机上就是52的尺寸, 如果想仍然是26px请不要用这个方法 直接写26

from flutter_screenutil.

zhangdaren avatar zhangdaren commented on July 20, 2024

可能是我设计稿还是什么原因,设计稿是750,其它地方用setWidth()适配看起来正常,,而用字体,直接用px也是很大,用setSp更大,,我尝试用setSp(26 ~/ ScreenUtil.pixelRatio)的时候,看起却像是那么回事,先就这样用着。

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

你的设计稿上字体单位是什么? 我怀疑不是px ,如果不是 先转成px

from flutter_screenutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.