ModulaToggleButton constructor
const
ModulaToggleButton({
- required bool value,
- required ValueChanged<
bool> onChanged, - Key? key,
- double width = 60.0,
- double height = 30.0,
- double borderRadius = 20.0,
- Color activeColor = Colors.green,
- Color inactiveColor = Colors.grey,
- Color thumbColor = Colors.white,
- IconData? activeIcon,
- IconData? inactiveIcon,
- Duration animationDuration = const Duration(milliseconds: 300),
- bool isCircleShape = true,
- bool showIconsOnThumb = false,
Implementation
const ModulaToggleButton({
required this.value,
required this.onChanged,
super.key,
this.width = 60.0,
this.height = 30.0,
this.borderRadius = 20.0,
this.activeColor = Colors.green,
this.inactiveColor = Colors.grey,
this.thumbColor = Colors.white,
this.activeIcon,
this.inactiveIcon,
this.animationDuration = const Duration(milliseconds: 300),
this.isCircleShape = true,
this.showIconsOnThumb = false,
});