【发布时间】:2020-10-18 13:56:01
【问题描述】:
我尝试了似乎仅适用于颜色的混合模式,即 colorblendmode。有什么办法可以实现mix-blend-mode as of CSS?
Stack(
children: <Widget>[
Image.asset(
"asset/text.PNG",
height: double.maxFinite,
width: double.maxFinite,
fit: BoxFit.fitHeight,
color: Colors.red,
colorBlendMode: BlendMode.multiply,
),
Image.asset("asset/face.jpg",
width: double.maxFinite,
fit: BoxFit.fitHeight,
color: Colors.red,
colorBlendMode: BlendMode.multiply),
],
),
这会产生如下结果: The output of code above
我想得到什么 Output from CSS
【问题讨论】:
-
不知道。但也许您可以尝试使用 BlendMode.
的不同组合。我的意思是,不仅仅是乘法。另一种方法是尝试 OverlayPainter 和 BlendMode。 -
我想我有一个使用 RenderElements 和 BlendModes 的解决方案。应该稍后出来。
标签: flutter mix-blend-mode flutter-image