diff --git a/examples/flutter_gallery/lib/demo/material/icons_demo.dart b/examples/flutter_gallery/lib/demo/material/icons_demo.dart index 07f4dd04028..d5692f001ca 100644 --- a/examples/flutter_gallery/lib/demo/material/icons_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/icons_demo.dart @@ -52,16 +52,16 @@ class IconsDemoState extends State { ), body: new IconTheme( data: new IconThemeData(color: iconColor), - child: new Padding( - padding: const EdgeInsets.all(24.0), - child: new SafeArea( - top: false, - bottom: false, - child: new Column( - children: [ - new _IconsDemoCard(handleIconButtonPress), - ], - ), + child: new SafeArea( + top: false, + bottom: false, + child: new ListView( + padding: const EdgeInsets.all(24.0), + children: [ + new _IconsDemoCard(handleIconButtonPress, Icons.face), // direction-agnostic icon + const SizedBox(height: 24.0), + new _IconsDemoCard(handleIconButtonPress, Icons.battery_unknown), // direction-aware icon + ], ), ), ), @@ -70,10 +70,10 @@ class IconsDemoState extends State { } class _IconsDemoCard extends StatelessWidget { - - const _IconsDemoCard(this.handleIconButtonPress); + const _IconsDemoCard(this.handleIconButtonPress, this.icon); final VoidCallback handleIconButtonPress; + final IconData icon; Widget _buildIconButton(double iconSize, IconData icon, bool enabled) { return new IconButton( @@ -95,8 +95,8 @@ class _IconsDemoCard extends StatelessWidget { return new TableRow( children: [ _centeredText(size.floor().toString()), - _buildIconButton(size, Icons.face, true), - _buildIconButton(size, Icons.face, false), + _buildIconButton(size, icon, true), + _buildIconButton(size, icon, false), ], ); } diff --git a/packages/flutter/lib/src/widgets/icon.dart b/packages/flutter/lib/src/widgets/icon.dart index 941063d7a38..03eed58c254 100644 --- a/packages/flutter/lib/src/widgets/icon.dart +++ b/packages/flutter/lib/src/widgets/icon.dart @@ -151,7 +151,7 @@ class Icon extends StatelessWidget { switch (textDirection) { case TextDirection.rtl: iconWidget = new Transform( - transform: new Matrix4.identity()..scale(-1.0), + transform: new Matrix4.identity()..scale(-1.0, 1.0, 1.0), alignment: Alignment.center, transformHitTests: false, child: iconWidget,