switchlisttile flutter in listview builder 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),
),