gpt4 book ai didi

flutter - 最新的Flutter SVG包(flutter_svg 2.0.0+1)的着色是如何工作的

转载 作者:行者123 更新时间:2023-12-03 07:58:23 29 4
gpt4 key购买 nike

将 flutter_svg 包升级到截至目前的最新版本 (2.0.0+1) 后。linting 表明 color 成员已被贬值,但有一个名为“colorFilter”的参数,但它具有不同的枚举属性,以某种方式呈现不同的效果。有人可以解释一下如何向 SVG 添加普通颜色属性或者 colorFilter 如何正常工作,谢谢。

Link to the package on pub dev

Here is an image of the new properties of the colorFilter.mode

最佳答案

就我而言,我将 ColorFilter.modeBlendMode.scrIn 一起使用,它工作正常,其他模式似乎在视觉上无法正常工作。因此,如果您想将颜色设置为 svg,如果您使用正确的 BlendMode,它应该可以工作。

附注我有底部导航,我必须在其中更改事件 svg 图标的颜色。

code example

关于flutter - 最新的Flutter SVG包(flutter_svg 2.0.0+1)的着色是如何工作的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75333924/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com