]
),
)
),
);
}
}
class MyPainter extends CustomPainter {
Paint customPaint = new Paint()
…color = Colors.orange
…strokeCap = StrokeCap.round
…isAntiAlias = true
…strokeWidth = 10.0
…style = PaintingStyle.stroke;
@override
void paint(Canvas canvas, Size size) {
canvas.drawLine(Offset(0.0, 0.0), Offset(200.0, 0.0), customPaint);
canvas.drawPoints(
PointMode.points,
[
Offset(20.0, 130.0),
Offset(100.0, 180.0),
],
customPaint…color = Colors.redAccent
);
canvas.drawCircle(
Offset(100.0, 50.0),
30.0,
customPaint
…color = Colors.blue
…style = PaintingStyle.stroke
);
canvas.drawColor(Colors.red, BlendMode.color);
canvas.drawOval(
Rect.fromPoints(Offset(170.0, 100.0), O