drawDusty method
绘制浮尘
Implementation
void drawDusty(Canvas canvas, Size size) {
ui.Image image = images[0];
canvas.save();
const identity = ColorFilter.matrix(<double>[
0.62,
0,
0,
0,
0,
0,
0.55,
0,
0,
0,
0,
0,
0.45,
0,
0,
0,
0,
0,
1,
0,
]);
_paint.colorFilter = identity;
final scale = 2.0 * widthRatio;
ui.Offset offset1 = ui.Offset(-image.width.toDouble() * 0.5, -200);
canvas.scale(scale, scale);
canvas.drawImage(image, offset1, _paint);
canvas.restore();
}