ToggleSwitch constructor

ToggleSwitch({
  1. Key? key,
  2. int? totalSwitches,
  3. List<String>? labels,
  4. List<bool>? states,
  5. List<Color>? borderColor,
  6. double? borderWidth,
  7. Color dividerColor = Colors.white30,
  8. List<Color>? activeBgColor,
  9. Color? activeFgColor,
  10. Color? inactiveBgColor,
  11. Color? inactiveFgColor,
  12. OnToggle? onToggle,
  13. CancelToggle? cancelToggle,
  14. double cornerRadius = 8.0,
  15. int? initialLabelIndex = 0,
  16. double minWidth = 72.0,
  17. double minHeight = 40.0,
  18. bool changeOnTap = true,
  19. List<IconData?>? icons,
  20. List<List<Color>?>? activeBgColors,
  21. List<TextStyle?>? customTextStyles,
  22. List<Icon?>? customIcons,
  23. List<double>? customWidths,
  24. List<double>? customHeights,
  25. bool animate = false,
  26. int animationDuration = 800,
  27. Curve curve = Curves.easeIn,
  28. bool radiusStyle = false,
  29. bool textDirectionRTL = false,
  30. double fontSize = 14.0,
  31. double iconSize = 17.0,
  32. double? dividerMargin = 8.0,
  33. bool doubleTapDisable = false,
  34. bool isVertical = false,
  35. List<Border?>? activeBorders,
  36. bool centerText = false,
  37. bool multiLineText = false,
  38. List<Widget>? customWidgets,
})

Implementation

ToggleSwitch({
  Key? key,
  this.totalSwitches,
  this.labels,
  this.states,
  this.borderColor,
  this.borderWidth,
  this.dividerColor = Colors.white30,
  this.activeBgColor,
  this.activeFgColor,
  this.inactiveBgColor,
  this.inactiveFgColor,
  this.onToggle,
  this.cancelToggle,
  this.cornerRadius = 8.0,
  this.initialLabelIndex = 0,
  this.minWidth = 72.0,
  this.minHeight = 40.0,
  this.changeOnTap = true,
  this.icons,
  this.activeBgColors,
  this.customTextStyles,
  this.customIcons,
  this.customWidths,
  this.customHeights,
  this.animate = false,
  this.animationDuration = 800,
  this.curve = Curves.easeIn,
  this.radiusStyle = false,
  this.textDirectionRTL = false,
  this.fontSize = 14.0,
  this.iconSize = 17.0,
  this.dividerMargin = 8.0,
  this.doubleTapDisable = false,
  this.isVertical = false,
  this.activeBorders,
  this.centerText = false,
  this.multiLineText = false,
  this.customWidgets,
}) : super(key: key);