BadSwitch constructor
const
BadSwitch({
- Key? key,
- required bool active,
- required VoidCallback onTap,
- double width = 40,
- double height = 24,
- EdgeInsets padding = const EdgeInsets.all(2),
- Color handleColor = Colors.white,
- Color activeHandleColor = Colors.white,
- Color trackColor = Colors.grey,
- 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);