| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 import '../fn2.dart'; | 5 import '../fn2.dart'; |
| 6 import '../rendering/box.dart'; | 6 import '../rendering/box.dart'; |
| 7 import '../rendering/object.dart'; | 7 import '../rendering/object.dart'; |
| 8 | 8 |
| 9 enum ScaffoldSlots { | 9 enum ScaffoldSlots { |
| 10 toolbar, | 10 toolbar, |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 _drawer = drawer, | 169 _drawer = drawer, |
| 170 _floatingActionButton = floatingActionButton, | 170 _floatingActionButton = floatingActionButton, |
| 171 super(key: key); | 171 super(key: key); |
| 172 | 172 |
| 173 UINode _toolbar; | 173 UINode _toolbar; |
| 174 UINode _body; | 174 UINode _body; |
| 175 UINode _statusbar; | 175 UINode _statusbar; |
| 176 UINode _drawer; | 176 UINode _drawer; |
| 177 UINode _floatingActionButton; | 177 UINode _floatingActionButton; |
| 178 | 178 |
| 179 // we don't have a syncFields() because all our fields are synced by syncRende
rObject() |
| 180 |
| 179 RenderScaffold root; | 181 RenderScaffold root; |
| 180 RenderScaffold createNode() => new RenderScaffold(); | 182 RenderScaffold createNode() => new RenderScaffold(); |
| 181 | 183 |
| 182 void insert(RenderObjectWrapper child, ScaffoldSlots slot) { | 184 void insert(RenderObjectWrapper child, ScaffoldSlots slot) { |
| 183 root[slot] = child != null ? child.root : null; | 185 root[slot] = child != null ? child.root : null; |
| 184 } | 186 } |
| 185 | 187 |
| 186 void removeChild(UINode node) { | 188 void removeChild(UINode node) { |
| 187 assert(node != null); | 189 assert(node != null); |
| 188 root.remove(node.root); | 190 root.remove(node.root); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 206 void syncRenderObject(UINode old) { | 208 void syncRenderObject(UINode old) { |
| 207 super.syncRenderObject(old); | 209 super.syncRenderObject(old); |
| 208 _toolbar = syncChild(_toolbar, old is Scaffold ? old._toolbar : null, Scaffo
ldSlots.toolbar); | 210 _toolbar = syncChild(_toolbar, old is Scaffold ? old._toolbar : null, Scaffo
ldSlots.toolbar); |
| 209 _body = syncChild(_body, old is Scaffold ? old._body : null, ScaffoldSlots.b
ody); | 211 _body = syncChild(_body, old is Scaffold ? old._body : null, ScaffoldSlots.b
ody); |
| 210 _statusbar = syncChild(_statusbar, old is Scaffold ? old._statusbar : null,
ScaffoldSlots.statusBar); | 212 _statusbar = syncChild(_statusbar, old is Scaffold ? old._statusbar : null,
ScaffoldSlots.statusBar); |
| 211 _drawer = syncChild(_drawer, old is Scaffold ? old._drawer : null, ScaffoldS
lots.drawer); | 213 _drawer = syncChild(_drawer, old is Scaffold ? old._drawer : null, ScaffoldS
lots.drawer); |
| 212 _floatingActionButton = syncChild(_floatingActionButton, old is Scaffold ? o
ld._floatingActionButton : null, ScaffoldSlots.floatingActionButton); | 214 _floatingActionButton = syncChild(_floatingActionButton, old is Scaffold ? o
ld._floatingActionButton : null, ScaffoldSlots.floatingActionButton); |
| 213 } | 215 } |
| 214 | 216 |
| 215 } | 217 } |
| OLD | NEW |