Code Monkey home page Code Monkey logo

Comments (5)

wendux avatar wendux commented on May 14, 2024

只需要2x和3x的话可以将2x的作为主资源,只保留3x的变体。

from flutter-in-action.

wangchuanwen avatar wangchuanwen commented on May 14, 2024

只需要2x和3x的话可以将2x的作为主资源,只保留3x的变体。

将2x的作为主资源,只保留3x的变体。

在代码中,使用2x图如下:
Image.asset('images/icon_home_dis.png'); 在2x设备上图片放大,3x设备上没有问题
正常应该是这样
image
去掉2.0x文件夹,把2x作为主资源,显示异常如下:
_ea933374-9146-446d-9e5a-5365ecb858e1

from flutter-in-action.

wendux avatar wendux commented on May 14, 2024

显式设置一下Image的宽高

from flutter-in-action.

HZRZCW avatar HZRZCW commented on May 14, 2024

需要显式设置一下Image的宽高的话就没什么意思了

from flutter-in-action.

songxing10000 avatar songxing10000 commented on May 14, 2024

最近也有同样的问题,为啥只放2x 3x,系统不能自动识别呢

from flutter-in-action.

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.