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
This commit is contained in:
parent
8b5ece7ca9
commit
6ffcadfa38
@ -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> {
|
|||||||
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> {
|
|||||||
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)
|
|
||||||
),
|
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user