diff --git a/examples/address_book/lib/main.dart b/examples/address_book/lib/main.dart index 4394946d930..e1066a11429 100644 --- a/examples/address_book/lib/main.dart +++ b/examples/address_book/lib/main.dart @@ -20,7 +20,7 @@ class Field extends StatelessComponent { return new Row([ new Padding( padding: const EdgeDims.symmetric(horizontal: 16.0), - child: new Icon(type: icon) + child: new Icon(icon: icon) ), new Flexible( child: new Input( @@ -43,7 +43,7 @@ class AddressBookHome extends StatelessComponent { Widget buildFloatingActionButton(BuildContext context) { return new FloatingActionButton( - child: new Icon(type: 'image/photo_camera'), + child: new Icon(icon: 'image/photo_camera'), backgroundColor: Theme.of(context).accentColor ); } diff --git a/examples/fitness/lib/feed.dart b/examples/fitness/lib/feed.dart index fa15bf5c4b8..69a1e63e436 100644 --- a/examples/fitness/lib/feed.dart +++ b/examples/fitness/lib/feed.dart @@ -200,7 +200,7 @@ class FeedFragmentState extends State { switch (_fitnessMode) { case FitnessMode.feed: return new FloatingActionButton( - child: new Icon(type: 'content/add'), + child: new Icon(icon: 'content/add'), onPressed: _handleActionButtonPressed ); case FitnessMode.chart: diff --git a/examples/stocks/lib/stock_home.dart b/examples/stocks/lib/stock_home.dart index c6069723894..bd9a9e783e7 100644 --- a/examples/stocks/lib/stock_home.dart +++ b/examples/stocks/lib/stock_home.dart @@ -252,7 +252,7 @@ class StockHomeState extends State { Widget buildFloatingActionButton() { return new FloatingActionButton( - child: new Icon(type: 'content/add'), + child: new Icon(icon: 'content/add'), backgroundColor: Colors.redAccent[200], onPressed: _handleStockPurchased ); diff --git a/examples/stocks/lib/stock_menu.dart b/examples/stocks/lib/stock_menu.dart index 5363aa3f895..0f93830cd53 100644 --- a/examples/stocks/lib/stock_menu.dart +++ b/examples/stocks/lib/stock_menu.dart @@ -62,7 +62,7 @@ Future showStockMenu({BuildContext context, bool autorefresh, ValueChanged new FlatButton( child: new Row([ new Icon( - type: 'device/dvr', + icon: 'device/dvr', size: IconSize.s18 ), new Container( diff --git a/examples/widgets/card_collection.dart b/examples/widgets/card_collection.dart index 9c476666dec..5ebfff02c09 100644 --- a/examples/widgets/card_collection.dart +++ b/examples/widgets/card_collection.dart @@ -329,11 +329,11 @@ class CardCollectionState extends State { backgroundMessage = "Unsupported dismissDirection"; } - Widget leftArrowIcon = new Icon(type: 'navigation/arrow_back', size: IconSize.s36); + Widget leftArrowIcon = new Icon(icon: 'navigation/arrow_back', size: IconSize.s36); if (_dismissDirection == DismissDirection.right) leftArrowIcon = new Opacity(opacity: 0.1, child: leftArrowIcon); - Widget rightArrowIcon = new Icon(type: 'navigation/arrow_forward', size: IconSize.s36); + Widget rightArrowIcon = new Icon(icon: 'navigation/arrow_forward', size: IconSize.s36); if (_dismissDirection == DismissDirection.left) rightArrowIcon = new Opacity(opacity: 0.1, child: rightArrowIcon); diff --git a/sky/packages/sky/lib/src/material/drawer_item.dart b/sky/packages/sky/lib/src/material/drawer_item.dart index bc4d431637a..6fdeaa90b70 100644 --- a/sky/packages/sky/lib/src/material/drawer_item.dart +++ b/sky/packages/sky/lib/src/material/drawer_item.dart @@ -48,7 +48,7 @@ class DrawerItem extends StatelessComponent { new Padding( padding: const EdgeDims.symmetric(horizontal: 16.0), child: new Icon( - type: icon, + icon: icon, colorFilter: _getColorFilter(themeData) ) ) diff --git a/sky/packages/sky/lib/src/material/dropdown.dart b/sky/packages/sky/lib/src/material/dropdown.dart index c512d04a985..023c1d93892 100644 --- a/sky/packages/sky/lib/src/material/dropdown.dart +++ b/sky/packages/sky/lib/src/material/dropdown.dart @@ -223,7 +223,7 @@ class DropdownButton extends StatelessComponent { alignment: const FractionalOffset(0.5, 0.0) ), new Container( - child: new Icon(type: 'navigation/arrow_drop_down', size: IconSize.s36), + child: new Icon(icon: 'navigation/arrow_drop_down', size: IconSize.s36), padding: const EdgeDims.only(top: 6.0) ) ]) diff --git a/sky/packages/sky/lib/src/material/icon.dart b/sky/packages/sky/lib/src/material/icon.dart index 11881458a20..d3a8aa8e6d0 100644 --- a/sky/packages/sky/lib/src/material/icon.dart +++ b/sky/packages/sky/lib/src/material/icon.dart @@ -26,16 +26,16 @@ class Icon extends StatelessComponent { Icon({ Key key, this.size: IconSize.s24, - this.type: '', + this.icon: '', this.color, this.colorFilter }) : super(key: key) { assert(size != null); - assert(type != null); + assert(icon != null); } final IconSize size; - final String type; + final String icon; final IconThemeColor color; final ColorFilter colorFilter; @@ -60,7 +60,7 @@ class Icon extends StatelessComponent { Widget build(BuildContext context) { String category = ''; String subtype = ''; - List parts = type.split('/'); + List parts = icon.split('/'); if (parts.length == 2) { category = parts[0]; subtype = parts[1]; @@ -80,7 +80,7 @@ class Icon extends StatelessComponent { void debugFillDescription(List description) { super.debugFillDescription(description); - description.add('$type'); + description.add('$icon'); description.add('size: $size'); } } diff --git a/sky/packages/sky/lib/src/material/icon_button.dart b/sky/packages/sky/lib/src/material/icon_button.dart index eb78d316f46..b8d3c5df26a 100644 --- a/sky/packages/sky/lib/src/material/icon_button.dart +++ b/sky/packages/sky/lib/src/material/icon_button.dart @@ -27,7 +27,7 @@ class IconButton extends StatelessComponent { child: new Padding( padding: const EdgeDims.all(8.0), child: new Icon( - type: icon, + icon: icon, color: color, colorFilter: colorFilter ) diff --git a/sky/packages/sky/lib/src/material/tabs.dart b/sky/packages/sky/lib/src/material/tabs.dart index 00b8c1b0f69..40ae53cbf43 100644 --- a/sky/packages/sky/lib/src/material/tabs.dart +++ b/sky/packages/sky/lib/src/material/tabs.dart @@ -320,7 +320,7 @@ class Tab extends StatelessComponent { assert(label.icon != null); Color iconColor = selected ? selectedColor : color; ColorFilter filter = new ColorFilter.mode(iconColor, TransferMode.srcATop); - return new Icon(type: label.icon, colorFilter: filter); + return new Icon(icon: label.icon, colorFilter: filter); } Widget build(BuildContext context) {