diff --git a/examples/raw/painting.sky b/examples/raw/painting.sky index 075867a8c6e..b0731a95594 100644 --- a/examples/raw/painting.sky +++ b/examples/raw/painting.sky @@ -26,8 +26,12 @@ void main() { paint.color = const Color.fromARGB(128, 255, 0, 255); context.rotateDegrees(45.0); + Gradient yellowBlue = new Gradient.Linear( + [new Point(-radius, -radius), new Point(0.0, 0.0)], + [const Color(0xFFFFFF00), const Color(0xFF0000FF)], + null); context.drawRect(new Rect.fromLTRB(-radius, -radius, radius, radius), - paint); + new Paint()..setShader(yellowBlue)); // Scale x and y by 0.5. var scaleMatrix = new Float32List.fromList([