Custom switch images are nutty (#4852)
Rather than requiring the developer to specify a full Decoration, we now just take an ImageProvider for the thumb image. Also, fix ImageFit.scaleDown to actually work. Fixes #4571 Fixes #4673
This commit is contained in:
@@ -168,11 +168,14 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> {
|
||||
child: new Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
new Switch(value: switchValue, onChanged: (bool value) {
|
||||
setState(() {
|
||||
new Switch(
|
||||
value: switchValue,
|
||||
onChanged: (bool value) {
|
||||
setState(() {
|
||||
switchValue = value;
|
||||
});
|
||||
}),
|
||||
});
|
||||
}
|
||||
),
|
||||
// Disabled switches
|
||||
new Switch(value: true, onChanged: null),
|
||||
new Switch(value: false, onChanged: null)
|
||||
|
||||
Reference in New Issue
Block a user