Flutter/UI/Cupertino/CupertinoSwitch
ナビゲーションに移動
検索に移動
iosスタイルスイッチ
Cupertinoスイッチ
ListTile(
title: Text('スイッチ1',
style: TextStyle(
locale: Locale("ja", "JP"),
fontSize: 15.0,
),
),
trailing: CupertinoSwitch(
value: _switchValue1,
onChanged: (bool value) {
setState(() {
_switchValue1 = value;
});
},
),
onTap: () {
setState(() {
_switchValue1 = !_switchValue1;
});
},
),