drawHazy method
绘制霾逻辑
Implementation
void drawHazy(Canvas canvas, Size size) {
ui.Image image = images[0];
canvas.save();
const identity = ColorFilter.matrix(<double>[
0.67,
0,
0,
0,
0,
0,
0.67,
0,
0,
0,
0,
0,
0.67,
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();
}