| 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 'dart:sky' as sky; | 6 import 'dart:sky' as sky; |
| 7 import '../rendering/box.dart'; | 7 import '../rendering/box.dart'; |
| 8 import '../rendering/object.dart'; | 8 import '../rendering/object.dart'; |
| 9 | 9 |
| 10 | 10 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 void insert(RenderObjectWrapper child, ScaffoldSlots slot) { | 180 void insert(RenderObjectWrapper child, ScaffoldSlots slot) { |
| 181 root[slot] = child != null ? child.root : null; | 181 root[slot] = child != null ? child.root : null; |
| 182 } | 182 } |
| 183 | 183 |
| 184 void removeChild(UINode node) { | 184 void removeChild(UINode node) { |
| 185 assert(node != null); | 185 assert(node != null); |
| 186 root.remove(node.root); | 186 root.remove(node.root); |
| 187 super.removeChild(node); | 187 super.removeChild(node); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void remove() { |
| 191 if (toolbar != null) |
| 192 removeChild(toolbar); |
| 193 if (body != null) |
| 194 removeChild(body); |
| 195 if (statusbar != null) |
| 196 removeChild(statusbar); |
| 197 if (drawer != null) |
| 198 removeChild(drawer); |
| 199 if (floatingActionButton != null) |
| 200 removeChild(floatingActionButton); |
| 201 super.remove(); |
| 202 } |
| 203 |
| 190 void syncRenderObject(UINode old) { | 204 void syncRenderObject(UINode old) { |
| 191 super.syncRenderObject(old); | 205 super.syncRenderObject(old); |
| 192 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.toolb
ar); | 206 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.toolb
ar); |
| 193 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.body); | 207 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.body); |
| 194 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.s
tatusBar); | 208 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.s
tatusBar); |
| 195 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.drawer)
; | 209 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.drawer)
; |
| 196 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton :
null, ScaffoldSlots.floatingActionButton); | 210 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton :
null, ScaffoldSlots.floatingActionButton); |
| 197 } | 211 } |
| 198 | 212 |
| 199 } | 213 } |
| OLD | NEW |