下面的代码生成径向渐变。然而,梯度没有从一种颜色到另一种颜色的平滑过渡。它阻止了像这样的过渡
http://www.color-hex.com/palettes/7133.png
有没有办法让渐变变得平滑?
Color gradient_start = const Color (0xDD222222);
Color gradient_end = const Color (0xDD444444);
//some code
new Container(
decoration: new BoxDecoration(
gradient:
new RadialGradient(
colors: [gradient_start, gradient_end],
radius: 1.0,
stops: [
0.0,
0.5,
],
tileMode: TileMode.clamp,
)
),
答案 0 :(得分:0)
删除“stops”属性以获得平滑过渡!