Code Monkey home page Code Monkey logo

Comments (10)

programmerElephant avatar programmerElephant commented on July 20, 2024

在设置的时候我都需要从设计图的值乘以2哇?

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

是像素. 单位px的那种

from flutter_screenutil.

programmerElephant avatar programmerElephant commented on July 20, 2024

我用设计图上面字体为14px,填进去setSp(14)过后根本看不见,初始化为iphone6的750X1335,测试为iphonex真机

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

可能你这个需要像素*2?

from flutter_screenutil.

programmerElephant avatar programmerElephant commented on July 20, 2024

就是*2过后正常

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

调整一下设计稿的设置.
可能设计的时候不太一样.

from flutter_screenutil.

programmerElephant avatar programmerElephant commented on July 20, 2024

我发现,字体没有根据不同机型来变大或者缩小,

ScreenUtil.instance = ScreenUtil(width: 750, height: 1334, allowFontScaling: true)..init(context);

ScreenUtil().setSp(20),

iphone6和iphoneX的字体并无变化

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

你试试打印一下ScreenUtil().setSp(20),
看看不同手机会不会有变化

from flutter_screenutil.

programmerElephant avatar programmerElephant commented on July 20, 2024

只有iphone6和iphonex没有变化,都是20,其余的plus和5s有改变

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

可能它觉得这俩手机上应该表现一致 ..

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.