📅  最后修改于: 2022-03-11 14:56:32.490000             🧑  作者: Mango
MergeSemantics(
child: ListTile(
title: Text('Lights'),
trailing: CupertinoSwitch(
value: _lights,
onChanged: (bool value) { setState(() { _lights = value; }); },
),
onTap: () { setState(() { _lights = !_lights; }); },
),
)