SwitchButton constructor
const
SwitchButton({
- Key? key,
- SwitchConfig config = const SwitchConfig(),
- bool enabled = true,
- bool value = false,
- double size = 30,
- Color? activeThumbColor,
- Color? inactiveThumbColor,
- Color? activeThumbStrokeColor,
- Color? inactiveThumbStrokeColor,
- Color? activeTrackColor,
- Color? inactiveTrackColor,
- Color? activeTrackStrokeColor,
- Color? inactiveTrackStrokeColor,
- dynamic activeThumbIcon,
- dynamic inactiveThumbIcon,
- Color? activeThumbIconTint,
- Color? inactiveThumbIconTint,
- double? activeThumbSpacing,
- double? inactiveThumbSpacing,
- double? activeThumbStrokeSize,
- double? inactiveThumbStrokeSize,
- double? thumbIconSpacing,
- int thumbWalkingTime = 200,
- double? trackBorderRadius,
- double? trackStrokeSize,
- double trackRatio = 1.65,
- OnViewToggleListener? onToggle,
Implementation
const SwitchButton({
super.key,
this.config = const SwitchConfig(),
this.enabled = true,
this.value = false,
this.size = 30,
this.activeThumbColor,
this.inactiveThumbColor,
this.activeThumbStrokeColor,
this.inactiveThumbStrokeColor,
this.activeTrackColor,
this.inactiveTrackColor,
this.activeTrackStrokeColor,
this.inactiveTrackStrokeColor,
this.activeThumbIcon,
this.inactiveThumbIcon,
this.activeThumbIconTint,
this.inactiveThumbIconTint,
this.activeThumbSpacing,
this.inactiveThumbSpacing,
this.activeThumbStrokeSize,
this.inactiveThumbStrokeSize,
this.thumbIconSpacing,
this.thumbWalkingTime = 200,
this.trackBorderRadius,
this.trackStrokeSize,
this.trackRatio = 1.65,
this.onToggle,
});