How to make a yes/no toggle switch in a flutter. I want the design as shown below.
CodePudding user response:
Try below answer hopeful its help to you:
CodePudding user response:
bool _switchValue=true;
in your dart file
CupertinoSwitch(
value: _switchValue,
onChanged: (value) {
setState(() {
_switchValue = value;
});
},
),