Commit 11332601 authored by Hixie's avatar Hixie

Remove keys from the examples.

TBR=abarth

Review URL: https://codereview.chromium.org/1194473004.
parent 95d090bc
...@@ -11,7 +11,6 @@ class ContainerApp extends App { ...@@ -11,7 +11,6 @@ class ContainerApp extends App {
Widget build() { Widget build() {
return new Flex([ return new Flex([
new Container( new Container(
key: 'a',
padding: new EdgeDims.all(10.0), padding: new EdgeDims.all(10.0),
margin: new EdgeDims.all(10.0), margin: new EdgeDims.all(10.0),
decoration: new BoxDecoration(backgroundColor: const Color(0xFFCCCCCC)), decoration: new BoxDecoration(backgroundColor: const Color(0xFFCCCCCC)),
...@@ -21,17 +20,14 @@ class ContainerApp extends App { ...@@ -21,17 +20,14 @@ class ContainerApp extends App {
) )
), ),
new Container( new Container(
key: 'b',
decoration: new BoxDecoration(backgroundColor: const Color(0xFFFFFF00)), decoration: new BoxDecoration(backgroundColor: const Color(0xFFFFFF00)),
padding: new EdgeDims.symmetric(horizontal: 50.0, vertical: 75.0), padding: new EdgeDims.symmetric(horizontal: 50.0, vertical: 75.0),
child: new Flex([ child: new Flex([
new RaisedButton( new RaisedButton(
key: 'b1',
child: new Text('PRESS ME'), child: new Text('PRESS ME'),
onPressed: () => print("Hello World") onPressed: () => print("Hello World")
), ),
new RaisedButton( new RaisedButton(
key: 'b2',
child: new Text('DISABLED'), child: new Text('DISABLED'),
onPressed: () => print("Hello World"), onPressed: () => print("Hello World"),
enabled: false enabled: false
......
...@@ -16,12 +16,10 @@ List<Route> routes = [ ...@@ -16,12 +16,10 @@ List<Route> routes = [
child: new Block([ child: new Block([
new Text("You are at home"), new Text("You are at home"),
new RaisedButton( new RaisedButton(
key: 'b',
child: new Text('GO SHOPPING'), child: new Text('GO SHOPPING'),
onPressed: () => navigator.pushNamed('shopping') onPressed: () => navigator.pushNamed('shopping')
), ),
new RaisedButton( new RaisedButton(
key: 'a',
child: new Text('START ADVENTURE'), child: new Text('START ADVENTURE'),
onPressed: () => navigator.pushNamed('adventure') onPressed: () => navigator.pushNamed('adventure')
) )
...@@ -36,12 +34,10 @@ List<Route> routes = [ ...@@ -36,12 +34,10 @@ List<Route> routes = [
child: new Block([ child: new Block([
new Text("Village Shop"), new Text("Village Shop"),
new RaisedButton( new RaisedButton(
key: 'a',
child: new Text('RETURN HOME'), child: new Text('RETURN HOME'),
onPressed: () => navigator.back() onPressed: () => navigator.back()
), ),
new RaisedButton( new RaisedButton(
key: 'b',
child: new Text('GO TO DUNGEON'), child: new Text('GO TO DUNGEON'),
onPressed: () => navigator.push(routes[2]) onPressed: () => navigator.push(routes[2])
) )
......
...@@ -84,7 +84,6 @@ class SectorApp extends App { ...@@ -84,7 +84,6 @@ class SectorApp extends App {
padding: new EdgeDims.symmetric(horizontal: 8.0, vertical: 25.0), padding: new EdgeDims.symmetric(horizontal: 8.0, vertical: 25.0),
child: new Flex([ child: new Flex([
new RaisedButton( new RaisedButton(
key: 'add-button',
enabled: enabledAdd, enabled: enabledAdd,
child: new ShrinkWrapWidth( child: new ShrinkWrapWidth(
child: new Flex([ child: new Flex([
...@@ -99,7 +98,6 @@ class SectorApp extends App { ...@@ -99,7 +98,6 @@ class SectorApp extends App {
onPressed: addSector onPressed: addSector
), ),
new RaisedButton( new RaisedButton(
key: 'remove-button',
enabled: enabledRemove, enabled: enabledRemove,
child: new ShrinkWrapWidth( child: new ShrinkWrapWidth(
child: new Flex([ child: new Flex([
......
...@@ -37,7 +37,7 @@ class Rectangle extends Component { ...@@ -37,7 +37,7 @@ class Rectangle extends Component {
Widget builder() { Widget builder() {
return new Flex([ return new Flex([
new Rectangle(const Color(0xFF00FFFF), key: 'a'), new Rectangle(const Color(0xFF00FFFF)),
new Container( new Container(
padding: new EdgeDims.all(10.0), padding: new EdgeDims.all(10.0),
margin: new EdgeDims.all(10.0), margin: new EdgeDims.all(10.0),
...@@ -50,7 +50,7 @@ Widget builder() { ...@@ -50,7 +50,7 @@ Widget builder() {
onPressed: () => print("Hello World") onPressed: () => print("Hello World")
) )
), ),
new Rectangle(const Color(0xFFFFFF00), key: 'b'), new Rectangle(const Color(0xFFFFFF00)),
], ],
direction: FlexDirection.vertical, direction: FlexDirection.vertical,
justifyContent: FlexJustifyContent.spaceBetween justifyContent: FlexJustifyContent.spaceBetween
......
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