ToggleSwitch constructor

ToggleSwitch({
  1. Key? key,
  2. required List<String> labels,
  3. Color? activeBgColor,
  4. Color? activeFgColor,
  5. Color? inactiveBgColor,
  6. Color? inactiveFgColor,
  7. OnToggle? onToggle,
  8. double cornerRadius = 8.0,
  9. int initialLabelIndex = 0,
  10. double minWidth = 72.0,
  11. double minHeight = 40.0,
  12. bool changeOnTap = true,
  13. List<IconData>? icons,
  14. List<Color>? activeBgColors,
  15. double fontSize = 14.0,
  16. double iconSize = 17.0,
})

Implementation

ToggleSwitch({
  Key? key,
  required this.labels,
  this.activeBgColor,
  this.activeFgColor,
  this.inactiveBgColor,
  this.inactiveFgColor,
  this.onToggle,
  this.cornerRadius = 8.0,
  this.initialLabelIndex = 0,
  this.minWidth = 72.0,
  this.minHeight = 40.0,
  this.changeOnTap = true,
  this.icons,
  this.activeBgColors,
  this.fontSize = 14.0,
  this.iconSize = 17.0,
}) : super(key: key);