SlidingSwitch constructor
const
SlidingSwitch({
- required bool value,
- required ValueChanged<
bool> onChanged, - double height = 55,
- double width = 250,
- Duration animationDuration = const Duration(milliseconds: 400),
- required Function onTap,
- required Function onDoubleTap,
- required Function onSwipe,
- String textOff = "Off",
- String textOn = "On",
- IconData? iconOff,
- IconData? iconOn,
- double contentSize = 17,
- Color colorOn = const Color(0xffdc6c73),
- Color colorOff = const Color(0xff6682c0),
- Color background = const Color(0xffe4e5eb),
- Color buttonColor = const Color(0xfff7f5f7),
- Color inactiveColor = const Color(0xff636f7b),
Implementation
const SlidingSwitch({
required this.value,
required this.onChanged,
this.height = 55,
this.width = 250,
this.animationDuration = const Duration(milliseconds: 400),
required this.onTap,
required this.onDoubleTap,
required this.onSwipe,
this.textOff = "Off",
this.textOn = "On",
this.iconOff,
this.iconOn,
this.contentSize = 17,
this.colorOn = const Color(0xffdc6c73),
this.colorOff = const Color(0xff6682c0),
this.background = const Color(0xffe4e5eb),
this.buttonColor = const Color(0xfff7f5f7),
this.inactiveColor = const Color(0xff636f7b),
}) : super();