| Index: sky/sdk/lib/widgets/icon.dart
|
| diff --git a/sky/sdk/lib/widgets/icon.dart b/sky/sdk/lib/widgets/icon.dart
|
| index 5bb3fac8032b8fd7f47fe15b873d8370f531e76c..3709ca4bc507324068ea1d2a93c92910351584a9 100644
|
| --- a/sky/sdk/lib/widgets/icon.dart
|
| +++ b/sky/sdk/lib/widgets/icon.dart
|
| @@ -2,18 +2,14 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +import '../mojo/asset_bundle.dart';
|
| import 'basic.dart';
|
|
|
| -// TODO(eseidel): This should use package:.
|
| -const String kAssetBase = '/packages/sky/assets/material-design-icons';
|
| +const String _kAssetBase = '/packages/sky/assets/material-design-icons/';
|
| +final AssetBundle _iconBundle = new NetworkAssetBundle(Uri.base.resolve(_kAssetBase));
|
|
|
| class Icon extends Component {
|
| -
|
| - Icon({
|
| - String key,
|
| - this.size,
|
| - this.type: ''
|
| - }) : super(key: key);
|
| + Icon({ String key, this.size, this.type: '' }) : super(key: key);
|
|
|
| final int size;
|
| final String type;
|
| @@ -29,10 +25,10 @@ class Icon extends Component {
|
| // TODO(eseidel): This clearly isn't correct. Not sure what would be.
|
| // Should we use the ios images on ios?
|
| String density = 'drawable-xxhdpi';
|
| - return new NetworkImage(
|
| - size: new Size(size.toDouble(), size.toDouble()),
|
| - src: '${kAssetBase}/${category}/${density}/ic_${subtype}_${size}dp.png'
|
| + return new AssetImage(
|
| + bundle: _iconBundle,
|
| + name: '${category}/${density}/ic_${subtype}_${size}dp.png',
|
| + size: new Size(size.toDouble(), size.toDouble())
|
| );
|
| }
|
| -
|
| }
|
|
|