CustomToggleButton constructor
const
CustomToggleButton({
- Key? key,
- required String textOn,
- required String textOff,
- required dynamic onChanged(
- String value
- double width = 200,
- double height = 45,
- double borderRadius = 50,
- int transitionTime = 300,
- Color activeTextColor = Colors.black,
- Color activeSwitchColor = Colors.white,
- Color inactiveTextColor = Colors.white,
- Color inactiveSwitchColor = Colors.blue,
Implementation
const CustomToggleButton({
Key? key,
required this.textOn,
required this.textOff,
required this.onChanged,
this.width = 200,
this.height = 45,
this.borderRadius = 50,
this.transitionTime = 300,
this.activeTextColor = Colors.black,
this.activeSwitchColor = Colors.white,
this.inactiveTextColor = Colors.white,
this.inactiveSwitchColor = Colors.blue,
}) : super(key: key);