Commit 4ca9ab22 authored by Adam Barth's avatar Adam Barth

Give ParentDataNodes snappier names

FlexExpandingChild -> Flexible
StackPositionedChild -> Positioned

Also, name the child argument |child| for consistency.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1179763009.
parent bb683e03
...@@ -127,7 +127,7 @@ class StocksApp extends App { ...@@ -127,7 +127,7 @@ class StocksApp extends App {
icon: 'action/thumb_up', icon: 'action/thumb_up',
onGestureTap: (event) => _handleStockModeChange(StockMode.optimistic), onGestureTap: (event) => _handleStockModeChange(StockMode.optimistic),
children: [ children: [
new FlexExpandingChild(new Text('Optimistic'), flex: 1), new Flexible(child: new Text('Optimistic')),
new Radio(key: 'optimistic-radio', value: StockMode.optimistic, groupValue: _stockMode, onChanged: _handleStockModeChange) new Radio(key: 'optimistic-radio', value: StockMode.optimistic, groupValue: _stockMode, onChanged: _handleStockModeChange)
]), ]),
new MenuItem( new MenuItem(
...@@ -135,7 +135,7 @@ class StocksApp extends App { ...@@ -135,7 +135,7 @@ class StocksApp extends App {
icon: 'action/thumb_down', icon: 'action/thumb_down',
onGestureTap: (event) => _handleStockModeChange(StockMode.pessimistic), onGestureTap: (event) => _handleStockModeChange(StockMode.pessimistic),
children: [ children: [
new FlexExpandingChild(new Text('Pessimistic'), flex: 1), new Flexible(child: new Text('Pessimistic')),
new Radio(key: 'pessimistic-radio', value: StockMode.pessimistic, groupValue: _stockMode, onChanged: _handleStockModeChange) new Radio(key: 'pessimistic-radio', value: StockMode.pessimistic, groupValue: _stockMode, onChanged: _handleStockModeChange)
]), ]),
new MenuDivider(key: 'div2'), new MenuDivider(key: 'div2'),
......
...@@ -26,13 +26,13 @@ class StockMenu extends Component { ...@@ -26,13 +26,13 @@ class StockMenu extends Component {
onChanged: this.onAutorefreshChanged onChanged: this.onAutorefreshChanged
); );
return new StackPositionedChild( return new Positioned(
new PopupMenu( child: new PopupMenu(
controller: controller, controller: controller,
items: [ items: [
[new Text('Add stock')], [new Text('Add stock')],
[new Text('Remove stock')], [new Text('Remove stock')],
[new FlexExpandingChild(new Text('Autorefresh')), checkbox], [new Flexible(child: new Text('Autorefresh')), checkbox],
], ],
level: 4 level: 4
), ),
......
...@@ -29,12 +29,12 @@ class StockRow extends Component { ...@@ -29,12 +29,12 @@ class StockRow extends Component {
new Container( new Container(
child: new StockArrow(percentChange: stock.percentChange), child: new StockArrow(percentChange: stock.percentChange),
margin: const EdgeDims.only(right: 5.0)), margin: const EdgeDims.only(right: 5.0)),
new FlexExpandingChild(new Text(stock.symbol), flex: 2, key: "symbol"), new Flexible(child: new Text(stock.symbol), flex: 2, key: "symbol"),
// TODO(hansmuller): text-align: right // TODO(hansmuller): text-align: right
new FlexExpandingChild(new Text(lastSale, new Flexible(child: new Text(lastSale,
style: const TextStyle(textAlign: TextAlign.right)), style: const TextStyle(textAlign: TextAlign.right)),
key: "lastSale"), key: "lastSale"),
new FlexExpandingChild(new Text(changeInPrice, new Flexible(child: new Text(changeInPrice,
style: typography.black.caption.copyWith(textAlign: TextAlign.right)), style: typography.black.caption.copyWith(textAlign: TextAlign.right)),
key: "changeInPrice") key: "changeInPrice")
]; ];
......
...@@ -38,8 +38,8 @@ class ContainerApp extends App { ...@@ -38,8 +38,8 @@ class ContainerApp extends App {
) )
]) ])
), ),
new FlexExpandingChild( new Flexible(
new Container( child: new Container(
decoration: new BoxDecoration(backgroundColor: const Color(0xFF00FFFF)) decoration: new BoxDecoration(backgroundColor: const Color(0xFF00FFFF))
) )
), ),
......
...@@ -27,8 +27,8 @@ class Rectangle extends Component { ...@@ -27,8 +27,8 @@ class Rectangle extends Component {
Rectangle(this.color, { Object key }) : super(key: key); Rectangle(this.color, { Object key }) : super(key: key);
final Color color; final Color color;
UINode build() { UINode build() {
return new FlexExpandingChild( return new Flexible(
new Container( child: new Container(
decoration: new BoxDecoration(backgroundColor: color) decoration: new BoxDecoration(backgroundColor: color)
) )
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment