ImageSwitch constructor
const
ImageSwitch({
- Key? key,
- required bool value,
- BuilderSwitch? builder,
- bool rotate = false,
- ValueChanged<
bool> ? onChanged, - double width = _kDefaultWidth,
- double height = _kDefaultHeight,
- double radius = _kDefaultHeight / 2,
- Color? activeBorderColor,
- Color? inactiveBorderColor,
- Color activeTrackColor = _kDefaultActiveColor,
- Color inactiveTrackColor = _kDefaultInactiveColor,
- Color? activeThumbColor = Colors.greenAccent,
- Color? inactiveThumbColor = Colors.grey,
- Widget? activeImage,
- Widget? inactiveImage,
- Duration duration = _kDefaultDuration,
- double paddingHorizontal = 1.5,
- double defaultStyleSize = _kDefaultHeight - 4,
- double defaultStyleRadius = 15,
Implementation
const ImageSwitch({
Key? key,
required this.value,
this.builder,
this.rotate = false,
this.onChanged,
this.width = _kDefaultWidth,
this.height = _kDefaultHeight,
this.radius = _kDefaultHeight / 2, // radius
this.activeBorderColor,
this.inactiveBorderColor,
this.activeTrackColor = _kDefaultActiveColor,
this.inactiveTrackColor = _kDefaultInactiveColor,
this.activeThumbColor = Colors.greenAccent,
this.inactiveThumbColor = Colors.grey,
this.activeImage,
this.inactiveImage,
this.duration = _kDefaultDuration,
this.paddingHorizontal = 1.5,
this.defaultStyleSize = _kDefaultHeight-4,
this.defaultStyleRadius = 15,
}): super(key: key);