From 6ffea218fe45255ae3a237c3d298f97a3c2fef19 Mon Sep 17 00:00:00 2001 From: Hixie Date: Wed, 27 May 2015 09:35:15 -0700 Subject: [PATCH] Replace setBoxDecoration() with a decoration property. (part II) This was supposed to be in https://codereview.chromium.org/1153893006/ TBR=abarth Review URL: https://codereview.chromium.org/1151383003 --- examples/raw/sector-layout.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/raw/sector-layout.dart b/examples/raw/sector-layout.dart index f296f38fce..825663843c 100644 --- a/examples/raw/sector-layout.dart +++ b/examples/raw/sector-layout.dart @@ -98,10 +98,12 @@ class RenderDecoratedSector extends RenderSector { RenderDecoratedSector(BoxDecoration decoration) : _decoration = decoration; - void setBoxDecoration(BoxDecoration decoration) { - if (_decoration == decoration) + BoxDecoration _decoration; + BoxDecoration get decoration => _decoration; + void set decoration (BoxDecoration value) { + if (value == _decoration) return; - _decoration = decoration; + _decoration = value; markNeedsPaint(); }