diff --git a/examples/raw/sector-layout.dart b/examples/raw/sector-layout.dart index f66415be69..36ee2af84a 100644 --- a/examples/raw/sector-layout.dart +++ b/examples/raw/sector-layout.dart @@ -126,10 +126,10 @@ class RenderDecoratedSector extends RenderSector { sky.Paint paint = new sky.Paint()..color = _decoration.backgroundColor; sky.Path path = new sky.Path(); double outerRadius = (parentData.radius + deltaRadius); - sky.Rect outerBounds = new sky.Rect()..setLTRB(-outerRadius, -outerRadius, outerRadius, outerRadius); + sky.Rect outerBounds = new sky.Rect.fromLTRB(-outerRadius, -outerRadius, outerRadius, outerRadius); path.arcTo(outerBounds, deg(parentData.theta), deg(deltaTheta), true); double innerRadius = parentData.radius; - sky.Rect innerBounds = new sky.Rect()..setLTRB(-innerRadius, -innerRadius, innerRadius, innerRadius); + sky.Rect innerBounds = new sky.Rect.fromLTRB(-innerRadius, -innerRadius, innerRadius, innerRadius); path.arcTo(innerBounds, deg(parentData.theta + deltaTheta), deg(-deltaTheta), false); path.close(); canvas.drawPath(path, paint); diff --git a/examples/raw/simple_render_tree.dart b/examples/raw/simple_render_tree.dart index 7ed385b2d6..1131ad17a0 100644 --- a/examples/raw/simple_render_tree.dart +++ b/examples/raw/simple_render_tree.dart @@ -10,7 +10,7 @@ class RenderSolidColor extends RenderDecoratedBox { final Size desiredSize; final int backgroundColor; - RenderSolidColor(int backgroundColor, { this.desiredSize }) + RenderSolidColor(int backgroundColor, { this.desiredSize: const sky.Size.infinite() }) : backgroundColor = backgroundColor, super(new BoxDecoration(backgroundColor: backgroundColor)) { } @@ -41,7 +41,7 @@ void main() { decoration: new BoxDecoration(backgroundColor: 0xFF000000)); void addFlexChild(RenderFlex parent, int backgroundColor, { int flex: 0 }) { - RenderNode child = new RenderSolidColor(backgroundColor, desiredSize: new Size.infinite()); + RenderNode child = new RenderSolidColor(backgroundColor); parent.add(child); child.parentData.flex = flex; } diff --git a/examples/raw/spinning_square.dart b/examples/raw/spinning_square.dart index 155f5ccc68..17072330d5 100644 --- a/examples/raw/spinning_square.dart +++ b/examples/raw/spinning_square.dart @@ -13,7 +13,7 @@ void beginFrame(double timeStamp) { PictureRecorder canvas = new PictureRecorder(view.width, view.height); canvas.translate(view.width / 2.0, view.height / 2.0); canvas.rotateDegrees(delta / 10); - canvas.drawRect(new Rect()..setLTRB(-100.0, -100.0, 100.0, 100.0), + canvas.drawRect(new Rect.fromLTRB(-100.0, -100.0, 100.0, 100.0), new Paint()..setARGB(255, 0, 255, 0)); view.picture = canvas.endRecording(); view.scheduleFrame(); diff --git a/examples/spinning_arabic.dart b/examples/spinning_arabic.dart index 843c570d8e..e42c2f4a45 100644 --- a/examples/spinning_arabic.dart +++ b/examples/spinning_arabic.dart @@ -15,7 +15,7 @@ void beginFrame(double timeStamp) { PictureRecorder canvas = new PictureRecorder(view.width, view.height); canvas.translate(view.width / 2.0, view.height / 2.0); canvas.rotateDegrees(delta / 10); - canvas.drawRect(new Rect()..setLTRB(-100.0, -100.0, 100.0, 100.0), + canvas.drawRect(new Rect.fromLTRB(-100.0, -100.0, 100.0, 100.0), new Paint()..setARGB(255, 0, 255, 0)); double sin = math.sin(delta / 200);