From d749a73805fb538bc212ded4d85f9dc63edaa8d0 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Wed, 28 Oct 2015 07:26:09 -0700 Subject: [PATCH] Icon should use an enum rather than an int for size Material design icons are defined to work at specific sizes: 18, 24, 36, 48. The current API doesn't reflect that and just takes a size int. If an invalid size is chosen an error is printed to the console and no icon shows up. Fixes #1816 --- engine/src/flutter/examples/address_book/lib/main.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/examples/address_book/lib/main.dart b/engine/src/flutter/examples/address_book/lib/main.dart index ab9372c1d73..4394946d930 100644 --- a/engine/src/flutter/examples/address_book/lib/main.dart +++ b/engine/src/flutter/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, size: 24) + child: new Icon(type: 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', size: 24), + child: new Icon(type: 'image/photo_camera'), backgroundColor: Theme.of(context).accentColor ); }