BadSwitch constructor

const BadSwitch({
  1. Key? key,
  2. required bool active,
  3. required VoidCallback onTap,
  4. double width = 40,
  5. double height = 24,
  6. EdgeInsets padding = const EdgeInsets.all(2),
  7. Color handleColor = Colors.white,
  8. Color activeHandleColor = Colors.white,
  9. Color trackColor = Colors.grey,
  10. Color activeTrackColor = Colors.blue,
})

Implementation

const BadSwitch({
  super.key,
  required this.active,
  required this.onTap,
  this.width = 40,
  this.height = 24,
  this.padding = const EdgeInsets.all(2),
  this.handleColor = Colors.white,
  this.activeHandleColor = Colors.white,
  this.trackColor = Colors.grey,
  this.activeTrackColor = Colors.blue,
}) : assert(width > height);