📜  合并两个小部件语义颤动 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:32.490000             🧑  作者: Mango

代码示例1
MergeSemantics(
  child: ListTile(
    title: Text('Lights'),
    trailing: CupertinoSwitch(
      value: _lights,
      onChanged: (bool value) { setState(() { _lights = value; }); },
    ),
    onTap: () { setState(() { _lights = !_lights; }); },
  ),
)