From 6ffcadfa38ccfbc9ea6bc1012fb8ea6fe28801d2 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Tue, 16 May 2017 19:34:50 -0700 Subject: [PATCH] Remove the slider from the Icon demo page (#10134) The slider never really made much sense and it violated UX guidelines. https://github.com/flutter/flutter/issues/4147 --- .../lib/demo/material/icons_demo.dart | 57 +++++-------------- 1 file changed, 13 insertions(+), 44 deletions(-) diff --git a/examples/flutter_gallery/lib/demo/material/icons_demo.dart b/examples/flutter_gallery/lib/demo/material/icons_demo.dart index 4ec2d9c3ea6..066daff45da 100644 --- a/examples/flutter_gallery/lib/demo/material/icons_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/icons_demo.dart @@ -90,8 +90,8 @@ class IconsDemoState extends State { buildSizeLabel(18, textStyle), buildSizeLabel(24, textStyle), buildSizeLabel(36, textStyle), - buildSizeLabel(48, textStyle) - ] + buildSizeLabel(48, textStyle), + ], ), new Expanded( child: new Column( @@ -101,8 +101,8 @@ class IconsDemoState extends State { buildIconButton(18.0, Icons.face, true), buildIconButton(24.0, Icons.alarm, true), buildIconButton(36.0, Icons.home, true), - buildIconButton(48.0, Icons.android, true) - ] + buildIconButton(48.0, Icons.android, true), + ], ) ), new Expanded( @@ -113,47 +113,16 @@ class IconsDemoState extends State { buildIconButton(18.0, Icons.face, false), buildIconButton(24.0, Icons.alarm, false), buildIconButton(36.0, Icons.home, false), - buildIconButton(48.0, Icons.android, false) - ] - ) - ) - ] + buildIconButton(48.0, Icons.android, false), + ], + ), + ), + ], ), - new Expanded( - child: new Center( - child: new IconTheme( - data: const IconThemeData(opacity: 1.0), - child: new Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - new Icon( - Icons.brightness_7, - color: iconColor.withAlpha(0x33) // 0.2 * 255 = 0x33 - ), - new Slider( - value: iconOpacity, - min: 0.2, - max: 1.0, - activeColor: iconColor, - onChanged: (double newValue) { - setState(() { - iconOpacity = newValue; - }); - } - ), - new Icon( - Icons.brightness_7, - color: iconColor.withAlpha(0xFF) - ), - ] - ) - ) - ) - ) - ] - ) - ) - ) + ], + ), + ), + ), ); } }