CustomSwitchWidget constructor
CustomSwitchWidget({
- Key? key,
- required CustomSwitchController controller,
- required dynamic onChange(),
- Color activeColor = Colors.black,
- double width = 50,
- double height = 30,
- double sizePoint = 20,
- Color pointColor = Colors.white,
- Color inactiveColor = Colors.grey,
- BorderRadiusGeometry? borderRadius,
Implementation
CustomSwitchWidget(
{Key? key,
required this.controller,
required this.onChange,
this.activeColor = Colors.black,
this.width = 50,
this.height = 30,
this.sizePoint = 20,
this.pointColor = Colors.white,
this.inactiveColor = Colors.grey,
this.borderRadius})
: super(key: key) {
assert(height >= 20 && height <= 50);
assert(width >= 30 && width <= 50);
assert(sizePoint >= 10 && sizePoint <= 30);
}