Home > database >  How to make yes/no switch in flutter
How to make yes/no switch in flutter

Time:10-01

How to make a yes/no toggle switch in a flutter. I want the design as shown below. design

CodePudding user response:

Try below answer hopeful its help to you:

You must used for Image

CodePudding user response:

bool _switchValue=true;

in your dart file

CupertinoSwitch(
              value: _switchValue,
              onChanged: (value) {
                setState(() {
                  _switchValue = value;
                });
              },
            ),
  • Related