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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 assert(box.parentData is BoxParentData); | 124 assert(box.parentData is BoxParentData); |
125 if (new sky.Rect.fromPointAndSize(box.parentData.position, box.size).con
tains(position)) { | 125 if (new sky.Rect.fromPointAndSize(box.parentData.position, box.size).con
tains(position)) { |
126 if (box.hitTest(result, position: (position - box.parentData.position)
.toPoint())) | 126 if (box.hitTest(result, position: (position - box.parentData.position)
.toPoint())) |
127 return; | 127 return; |
128 } | 128 } |
129 } | 129 } |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 String debugDescribeChildren(String prefix) { | 133 String debugDescribeChildren(String prefix) { |
134 return _slots.keys.map((slot) => '${prefix}${slot}: ${_slots[slot].toString(
prefix)}').join('\n'); | 134 return _slots.keys.map((slot) => '${prefix}${slot}: ${_slots[slot].toString(
prefix)}').join(); |
135 } | 135 } |
136 } | 136 } |
137 | 137 |
138 class Scaffold extends RenderObjectWrapper { | 138 class Scaffold extends RenderObjectWrapper { |
139 | 139 |
140 // static final Style _style = new Style(''' | 140 // static final Style _style = new Style(''' |
141 // ${typography.typeface}; | 141 // ${typography.typeface}; |
142 // ${typography.black.body1};'''); | 142 // ${typography.black.body1};'''); |
143 | 143 |
144 Scaffold({ | 144 Scaffold({ |
(...skipping 29 matching lines...) Expand all Loading... |
174 void syncRenderObject(UINode old) { | 174 void syncRenderObject(UINode old) { |
175 super.syncRenderObject(old); | 175 super.syncRenderObject(old); |
176 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.toolb
ar); | 176 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.toolb
ar); |
177 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.body); | 177 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.body); |
178 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.s
tatusBar); | 178 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.s
tatusBar); |
179 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.drawer)
; | 179 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.drawer)
; |
180 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton :
null, ScaffoldSlots.floatingActionButton); | 180 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton :
null, ScaffoldSlots.floatingActionButton); |
181 } | 181 } |
182 | 182 |
183 } | 183 } |
OLD | NEW |