你好!
是否有用于创建在开始颜色和 ens 颜色之间具有平滑过渡的 LinearGradient 的解决方案?
new Container(
decoration: new BoxDecoration(
gradient: new LinearGradient(
colors: [
Colors.black,
Colors.grey,
],
stops: [0.0, 1.0],
begin: FractionalOffset.topCenter,
end: FractionalOffset.bottomCenter,
tileMode: TileMode.repeated
)
),
)
Run Code Online (Sandbox Code Playgroud)
小智 6
在您的主要功能中Paint.enableDithering = true;,如下所示:
void main() {
Paint.enableDithering = true;
runApp(DesignChallenge05());
}
Run Code Online (Sandbox Code Playgroud)
当您在长距离(数百像素)的相似颜色之间进行转换时,屏幕可能无法平滑地渲染它。
一种可能的解决方案是在 Photoshop 中创建带有渐变的背景图像。对图像感到满意后,将其剪切为 1 像素宽度,并将其用作背景图像,垂直重复。
| 归档时间: |
|
| 查看次数: |
16348 次 |
| 最近记录: |