Rename Container's desiredSize argument to width and height arguments.
Also change SizedBox. This makes the code that uses Container() and SizedBox() much more readable. The underlying RenderSizedBox is not affected by this change. R=abarth@chromium.org, eseidel@chromium.org Review URL: https://codereview.chromium.org/1166203002
This commit is contained in:
@@ -24,13 +24,13 @@ class ContainerApp extends App {
|
||||
new Container(
|
||||
padding: new EdgeDims.all(10.0),
|
||||
margin: new EdgeDims.all(10.0),
|
||||
desiredSize: new sky.Size(double.INFINITY, 100.0),
|
||||
height: 100.0,
|
||||
decoration: new BoxDecoration(backgroundColor: const sky.Color(0xFF00FF00)),
|
||||
child: new BlockContainer(
|
||||
children: [
|
||||
new Container(
|
||||
decoration: new BoxDecoration(backgroundColor: const sky.Color(0xFFFFFF00)),
|
||||
desiredSize: new sky.Size(double.INFINITY, 20.0)
|
||||
height: 20.0,
|
||||
),
|
||||
new Image(src: "https://www.dartlang.org/logos/dart-logo.png",
|
||||
size: new sky.Size(300.0, 300.0),
|
||||
|
||||
@@ -32,21 +32,21 @@ class StockRow extends Component {
|
||||
// ),
|
||||
new FlexExpandingChild(new Text(stock.symbol)),
|
||||
new Container(
|
||||
desiredSize: const sky.Size.fromWidth(75.0),
|
||||
width: 75.0,
|
||||
padding: const EdgeDims.only(right: 16.0),
|
||||
// text-align: right
|
||||
child: new Text(lastSale)
|
||||
),
|
||||
// text-align: right, ${typography.black.caption};
|
||||
new SizedBox(
|
||||
desiredSize: const sky.Size.fromWidth(75.0),
|
||||
width: 75.0,
|
||||
child: new Text(changeInPrice)
|
||||
),
|
||||
];
|
||||
|
||||
return new Container(
|
||||
padding: const EdgeDims(16.0, 16.0, 20.0, 16.0),
|
||||
desiredSize: const sky.Size.fromHeight(kHeight),
|
||||
height: kHeight,
|
||||
decoration: const BoxDecoration(
|
||||
backgroundColor: const sky.Color(0xFFFFFFFF),
|
||||
border: const Border(
|
||||
|
||||
Reference in New Issue
Block a user