In my app, I want the switch is used to toggle a setting between on/off which is true/false respectively. When I went to build it, it turned out that flutter provides a default switch but it is not what I want, I want to customize it accordingly to my UI
This is the flutter switch button: -
Here is what I want: -
How can I make it possible for my UI?
set
bool _switchValue=true;
in your screen.dart
CupertinoSwitch(
value: _switchValue,
onChanged: (value) {
setState(() {
_switchValue = value;
});
},
),