Creates a material design switch.
The switch itself does not maintain any state. Instead, when the state of the switch changes, the widget calls the onChanged callback. Most widgets that use a switch will listen for the onChanged callback and rebuild the switch with a new value to update the visual appearance of the switch.
Source
Switch({
Key key,
@required this.value,
@required this.onChanged,
this.activeColor,
this.activeThumbImage,
this.inactiveThumbImage
}) : super(key: key);