| 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/node.dart'; | 8 import '../rendering/node.dart'; |
| 9 | 9 |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 if (old != null) | 41 if (old != null) |
| 42 dropChild(old); | 42 dropChild(old); |
| 43 _slots[slot] = value; | 43 _slots[slot] = value; |
| 44 if (value != null) | 44 if (value != null) |
| 45 adoptChild(value); | 45 adoptChild(value); |
| 46 markNeedsLayout(); | 46 markNeedsLayout(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 ScaffoldSlots remove(RenderBox child) { | 49 ScaffoldSlots remove(RenderBox child) { |
| 50 assert(child != null); | 50 assert(child != null); |
| 51 for (ScaffoldSlots slot in ScaffoldSlots) { | 51 for (ScaffoldSlots slot in ScaffoldSlots.values) { |
| 52 if (_slots[slot] == child) { | 52 if (_slots[slot] == child) { |
| 53 this[slot] = null; | 53 this[slot] = null; |
| 54 return slot; | 54 return slot; |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 return null; | 57 return null; |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool get sizedByParent => true; | 60 bool get sizedByParent => true; |
| 61 void performResize() { | 61 void performResize() { |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 void syncRenderNode(UINode old) { | 171 void syncRenderNode(UINode old) { |
| 172 super.syncRenderNode(old); | 172 super.syncRenderNode(old); |
| 173 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.Toolb
ar); | 173 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.Toolb
ar); |
| 174 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.Body); | 174 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.Body); |
| 175 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.S
tatusBar); | 175 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.S
tatusBar); |
| 176 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.Drawer)
; | 176 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.Drawer)
; |
| 177 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton :
null, ScaffoldSlots.FloatingActionButton); | 177 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton :
null, ScaffoldSlots.FloatingActionButton); |
| 178 } | 178 } |
| 179 | 179 |
| 180 } | 180 } |
| OLD | NEW |