Commit 6ffcadfa authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

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
parent 8b5ece7c
...@@ -90,8 +90,8 @@ class IconsDemoState extends State<IconsDemo> { ...@@ -90,8 +90,8 @@ class IconsDemoState extends State<IconsDemo> {
buildSizeLabel(18, textStyle), buildSizeLabel(18, textStyle),
buildSizeLabel(24, textStyle), buildSizeLabel(24, textStyle),
buildSizeLabel(36, textStyle), buildSizeLabel(36, textStyle),
buildSizeLabel(48, textStyle) buildSizeLabel(48, textStyle),
] ],
), ),
new Expanded( new Expanded(
child: new Column( child: new Column(
...@@ -101,8 +101,8 @@ class IconsDemoState extends State<IconsDemo> { ...@@ -101,8 +101,8 @@ class IconsDemoState extends State<IconsDemo> {
buildIconButton(18.0, Icons.face, true), buildIconButton(18.0, Icons.face, true),
buildIconButton(24.0, Icons.alarm, true), buildIconButton(24.0, Icons.alarm, true),
buildIconButton(36.0, Icons.home, true), buildIconButton(36.0, Icons.home, true),
buildIconButton(48.0, Icons.android, true) buildIconButton(48.0, Icons.android, true),
] ],
) )
), ),
new Expanded( new Expanded(
...@@ -113,47 +113,16 @@ class IconsDemoState extends State<IconsDemo> { ...@@ -113,47 +113,16 @@ class IconsDemoState extends State<IconsDemo> {
buildIconButton(18.0, Icons.face, false), buildIconButton(18.0, Icons.face, false),
buildIconButton(24.0, Icons.alarm, false), buildIconButton(24.0, Icons.alarm, false),
buildIconButton(36.0, Icons.home, 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: <Widget>[
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)
),
]
)
)
)
)
]
)
)
)
); );
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment