CustomSwitchWidget constructor

CustomSwitchWidget({
  1. Key? key,
  2. required CustomSwitchController controller,
  3. required dynamic onChange(
    1. bool
    ),
  4. Color activeColor = Colors.black,
  5. double width = 50,
  6. double height = 30,
  7. double sizePoint = 20,
  8. Color pointColor = Colors.white,
  9. Color inactiveColor = Colors.grey,
  10. 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);
}