From the documentation, follow this link and update the row with these
mainAxisAlignment: MainAxisAlignment.center, // Center the row contents
and a SizedBox
for some space
so it should look like this then
Row(
mainAxisAlignment: MainAxisAlignment.center, // center contents
children: <Widget>[
Text(label),
const SizedBox(width: 8), // some spacing between text and switch
Switch(
value: value,
onChanged: (bool newValue) {
onChanged(newValue);
},
),
],
),