【发布时间】:2020-01-25 20:58:47
【问题描述】:
background: ShaderMask(
shaderCallback: (rect) {
return LinearGradient(
begin: Alignment.topCenter,
end: TextAlignment.bottomCenter,
colors: [Colors.black, Colors.transparent],
).createShader(Rect.fromLTRB(0, 0, rect.width, rect.height));
},
blendMode: BlendMode.dstIn,
child: FadeInImage.assetNetwork(
placeholder: "assets/placeholder.jpg",
image: globals.me["avatar"].replaceAll("\\", ""),
),
),
当我调试这段代码时,我得到了这个错误:
The getter 'dstIn' isn't defined for the class 'BlendMode'.
Try importing the library that defines 'dstIn', correcting the name to the name of an existing getter, or defining a getter or field named 'dstIn'.
我找不到任何解决方案。我该如何解决这个问题?
【问题讨论】: