StyledSwitch constructor
StyledSwitch({
- Key? key,
- required bool value,
- required ValueChanged<
bool> ? onChanged, - required Style thumbStyle,
- Style? thumbHoveredStyle,
- Style? thumbSelectedStyle,
- Style? thumbDisabledStyle,
- required Style trackStyle,
- Style? trackSelectedStyle,
- Style? trackHoveredStyle,
- Style? trackDisabledStyle,
- Axis direction = Axis.horizontal,
- Curve curve = Curves.linear,
- Duration duration = const Duration(milliseconds: 100),
- Widget? thumbChild,
Implementation
StyledSwitch({
Key? key,
required this.value,
required this.onChanged,
required this.thumbStyle,
this.thumbHoveredStyle,
this.thumbSelectedStyle,
this.thumbDisabledStyle,
required this.trackStyle,
this.trackSelectedStyle,
this.trackHoveredStyle,
this.trackDisabledStyle,
this.direction = Axis.horizontal,
this.curve = Curves.linear,
this.duration = const Duration(milliseconds: 100),
Widget? thumbChild,
}) {
thumbChildBuilder = (context, state) {
return thumbChild;
};
}