diff --git a/examples/flutter_gallery/lib/demo/cupertino/cupertino_switch_demo.dart b/examples/flutter_gallery/lib/demo/cupertino/cupertino_switch_demo.dart index 8c62569aaa..313733ec33 100644 --- a/examples/flutter_gallery/lib/demo/cupertino/cupertino_switch_demo.dart +++ b/examples/flutter_gallery/lib/demo/cupertino/cupertino_switch_demo.dart @@ -23,13 +23,47 @@ class _CupertinoSwitchDemoState extends State { title: const Text('Cupertino Switch'), ), body: new Center( - child: new CupertinoSwitch( - value: _switchValue, - onChanged: (bool value) { - setState(() { - _switchValue = value; - }); - } + child: new Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + new Column( + children: [ + new CupertinoSwitch( + value: _switchValue, + onChanged: (bool value) { + setState(() { + _switchValue = value; + }); + }, + ), + const Text( + 'Active' + ), + ], + ), + new Column( + children: [ + new CupertinoSwitch( + value: true, + onChanged: null, + ), + const Text( + 'Disabled' + ), + ], + ), + new Column( + children: [ + new CupertinoSwitch( + value: false, + onChanged: null, + ), + const Text( + 'Disabled' + ), + ], + ), + ], ), ), );