Commit 89268a4a authored by Adam Barth's avatar Adam Barth

Update README.md

parent bd5b9566
...@@ -57,9 +57,10 @@ very commonly used: ...@@ -57,9 +57,10 @@ very commonly used:
padding, and constraints applied to its size. In addition, a `Container` can padding, and constraints applied to its size. In addition, a `Container` can
be transformed in three dimensional space using a matrix. be transformed in three dimensional space using a matrix.
* `Image`: The `Image` widget lets you display an image, referenced using a * `NetworkImage`: The `NetworkImage` widget lets you display an image, referenced
URL. The underlying image is cached, which means if several `Image` widgets using a URL. The underlying image is cached, which means if several
refer to the same URL, they'll share the underlying image resource. `NetworkImage` widgets refer to the same URL, they'll share the underlying image
resource.
Below is a simple toolbar example that shows how to combine these widgets: Below is a simple toolbar example that shows how to combine these widgets:
...@@ -75,9 +76,9 @@ class MyToolBar extends Component { ...@@ -75,9 +76,9 @@ class MyToolBar extends Component {
height: 56.0, height: 56.0,
padding: const EdgeDims.symmetric(horizontal: 8.0), padding: const EdgeDims.symmetric(horizontal: 8.0),
child: new Flex([ child: new Flex([
new Image(src: 'menu.png', size: const Size(25.0, 25.0)), new NetworkImage(src: 'menu.png', size: const Size(25.0, 25.0)),
new Flexible(child: new Text('My awesome toolbar')), new Flexible(child: new Text('My awesome toolbar')),
new Image(src: 'search.png', size: const Size(25.0, 25.0)), new NetworkImage(src: 'search.png', size: const Size(25.0, 25.0)),
]) ])
); );
} }
...@@ -207,7 +208,7 @@ button: ...@@ -207,7 +208,7 @@ button:
return new MyButton( return new MyButton(
child: new ShrinkWrapWidth( child: new ShrinkWrapWidth(
child: new Flex([ child: new Flex([
new Image(src: 'thumbs-up.png', size: const Size(25.0, 25.0)), new NetworkImage(src: 'thumbs-up.png', size: const Size(25.0, 25.0)),
new Container( new Container(
padding: const EdgeDims.only(left: 10.0), padding: const EdgeDims.only(left: 10.0),
child: new Text('Thumbs up') child: new Text('Thumbs up')
......
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