你知道如何用渐变制作容器边框吗?我想让它从一种颜色淡化到相同的0不透明度。
我也在考虑使用混合模式,我不认为这是一个好主意
在这一刻,我只看到一种方式。使用耀斑:https://www.2dimensions.com/a/stellarcreed/files/flare/border-gradient/preview
试试这个:
Center(
child: new Container(
decoration: new BoxDecoration(
color: Colors.purple,
gradient: new LinearGradient(
colors: [Colors.red, Colors.cyan],
),
),
child: new FlutterLogo(
size: 200.0,
)
),
);
这里有更多信息regarding this question。