提交 c5c3f31a 编写于 作者: A Adam Barth

Make the StockList actually work in stocks2

RenderScaffold needs to attach and detach its children when asked.

R=eseidel@chromium.org, ianh@google.com

Review URL: https://codereview.chromium.org/1149893025
上级 9b0cb975
......@@ -204,7 +204,7 @@ class StocksApp extends App {
List<UINode> overlays = [
new Scaffold(
toolbar: _isSearching ? buildSearchBar() : buildToolBar(),
// body: new Stocklist(stocks: _stocks, query: _searchQuery),
body: new Stocklist(stocks: _stocks, query: _searchQuery),
// floatingActionButton: new FloatingActionButton(
// content: new Icon(type: 'content/add_white', size: 24),
// level: 3),
......
......@@ -46,6 +46,22 @@ class RenderScaffold extends RenderBox {
markNeedsLayout();
}
void attachChildren() {
for (ScaffoldSlots slot in ScaffoldSlots.values) {
RenderBox box = _slots[slot];
if (box != null)
box.attach();
}
}
void detachChildren() {
for (ScaffoldSlots slot in ScaffoldSlots.values) {
RenderBox box = _slots[slot];
if (box != null)
box.detach();
}
}
ScaffoldSlots remove(RenderBox child) {
assert(child != null);
for (ScaffoldSlots slot in ScaffoldSlots.values) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册