ToggleSwitch constructor
ToggleSwitch({
- Key? key,
- required int totalSwitches,
- List<
String> ? labels, - List<
Color> ? borderColor, - double? borderWidth,
- Color dividerColor = Colors.white30,
- List<
Color> ? activeBgColor, - Color? activeFgColor,
- Color? inactiveBgColor,
- Color? inactiveFgColor,
- OnToggle? onToggle,
- double cornerRadius = 8.0,
- int? initialLabelIndex = 0,
- double minWidth = 72.0,
- double minHeight = 40.0,
- bool changeOnTap = true,
- List<
IconData?> ? icons, - List<
List< ? activeBgColors,Color> ?> - List<
TextStyle?> ? customTextStyles, - List<
Icon?> ? customIcons, - List<
double> ? customWidths, - bool animate = false,
- int animationDuration = 800,
- Curve curve = Curves.easeIn,
- bool radiusStyle = false,
- bool textDirectionRTL = false,
- double fontSize = 14.0,
- double iconSize = 17.0,
- bool doubleTapDisable = false,
Implementation
ToggleSwitch(
{Key? key,
required this.totalSwitches,
this.labels,
this.borderColor,
this.borderWidth,
this.dividerColor = Colors.white30,
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.customTextStyles,
this.customIcons,
this.customWidths,
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.doubleTapDisable = false})
: super(key: key);