switchlisttile toggle moving all at same time code example
Example: SwitchListTile flutter
Flutter SwitchListTile Widget
-------------------------------
SwitchListTile(
title: const Text('Lights'),
value: ans,
onChanged: (bool value) {
setState(() {
ans = value;
});
},
secondary: const Icon(Icons.lightbulb_outline),
),