提交 b1210c63 编写于 作者: H Hixie

Remove keys from the examples.

TBR=abarth

Review URL: https://codereview.chromium.org/1194473004.
上级 471a7f24
......@@ -11,7 +11,6 @@ class ContainerApp extends App {
Widget build() {
return new Flex([
new Container(
key: 'a',
padding: new EdgeDims.all(10.0),
margin: new EdgeDims.all(10.0),
decoration: new BoxDecoration(backgroundColor: const Color(0xFFCCCCCC)),
......@@ -21,17 +20,14 @@ class ContainerApp extends App {
)
),
new Container(
key: 'b',
decoration: new BoxDecoration(backgroundColor: const Color(0xFFFFFF00)),
padding: new EdgeDims.symmetric(horizontal: 50.0, vertical: 75.0),
child: new Flex([
new RaisedButton(
key: 'b1',
child: new Text('PRESS ME'),
onPressed: () => print("Hello World")
),
new RaisedButton(
key: 'b2',
child: new Text('DISABLED'),
onPressed: () => print("Hello World"),
enabled: false
......
......@@ -16,12 +16,10 @@ List<Route> routes = [
child: new Block([
new Text("You are at home"),
new RaisedButton(
key: 'b',
child: new Text('GO SHOPPING'),
onPressed: () => navigator.pushNamed('shopping')
),
new RaisedButton(
key: 'a',
child: new Text('START ADVENTURE'),
onPressed: () => navigator.pushNamed('adventure')
)
......@@ -36,12 +34,10 @@ List<Route> routes = [
child: new Block([
new Text("Village Shop"),
new RaisedButton(
key: 'a',
child: new Text('RETURN HOME'),
onPressed: () => navigator.back()
),
new RaisedButton(
key: 'b',
child: new Text('GO TO DUNGEON'),
onPressed: () => navigator.push(routes[2])
)
......
......@@ -84,7 +84,6 @@ class SectorApp extends App {
padding: new EdgeDims.symmetric(horizontal: 8.0, vertical: 25.0),
child: new Flex([
new RaisedButton(
key: 'add-button',
enabled: enabledAdd,
child: new ShrinkWrapWidth(
child: new Flex([
......@@ -99,7 +98,6 @@ class SectorApp extends App {
onPressed: addSector
),
new RaisedButton(
key: 'remove-button',
enabled: enabledRemove,
child: new ShrinkWrapWidth(
child: new Flex([
......
......@@ -37,7 +37,7 @@ class Rectangle extends Component {
Widget builder() {
return new Flex([
new Rectangle(const Color(0xFF00FFFF), key: 'a'),
new Rectangle(const Color(0xFF00FFFF)),
new Container(
padding: new EdgeDims.all(10.0),
margin: new EdgeDims.all(10.0),
......@@ -50,7 +50,7 @@ Widget builder() {
onPressed: () => print("Hello World")
)
),
new Rectangle(const Color(0xFFFFFF00), key: 'b'),
new Rectangle(const Color(0xFFFFFF00)),
],
direction: FlexDirection.vertical,
justifyContent: FlexJustifyContent.spaceBetween
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册