Port DrawerHeader to fn2 world.

This includes making SizedBox default to infinite size, and making
Container default to containing one infinite-sized SizedBox. That way,
you can use an empty Container as a spacer in a flex box.

The rendering doesn't quite work, because of a bug in flex whereby it
doesn't shrink-wrap its contents in the cross-direction, it fills the
parent. Collin is on that.

R=jackson@google.com

Review URL: https://codereview.chromium.org/1163633003
This commit is contained in:
Hixie
2015-06-08 11:00:05 -07:00
parent 1f26d65757
commit 77f5d4724a

View File

@@ -4,7 +4,7 @@
import 'package:sky/framework/components2/tool_bar.dart';
import 'package:sky/framework/components2/drawer.dart';
// import 'package:sky/framework/components2/drawer_header.dart';
import 'package:sky/framework/components2/drawer_header.dart';
import 'package:sky/framework/components2/floating_action_button.dart';
import 'package:sky/framework/components2/icon.dart';
import 'package:sky/framework/components2/icon_button.dart';
@@ -115,7 +115,7 @@ class StocksApp extends App {
controller: _drawerController,
level: 3,
children: [
// new DrawerHeader(children: [new Text('Stocks')]),
new DrawerHeader(children: [new Text('Stocks')]),
new MenuItem(
key: 'Stock list',
icon: 'action/assessment',