drawSunny method
绘制阳光
Implementation
void drawSunny(Canvas canvas, Size size) {
ui.Image image = images[0];
ui.Image image1 = images[1];
_paint.maskFilter = const MaskFilter.blur(BlurStyle.normal, 40);
canvas.save();
final sunScale = 1.2 * widthRatio;
canvas.scale(sunScale, sunScale);
var finalWidth = image1.width.toDouble() * sunScale;
var offset =
Offset(width.toDouble() - finalWidth, -image1.width.toDouble() / 3);
// var offset = Offset(width.toDouble() - image1.width.toDouble() * sunScale,
// -image1.width.toDouble() / 2);
canvas.drawImage(image1, offset, _paint);
canvas.restore();
canvas.save();
final scale = 0.6 * widthRatio;
ui.Offset offset1 = const ui.Offset(-100, -100);
canvas.scale(scale);
canvas.drawImage(image, offset1, _paint);
canvas.restore();
}