GFToggle constructor
const
GFToggle({
- Key? key,
- required ValueChanged<
bool?> onChanged, - required bool value,
- String? enabledText,
- String? disabledText,
- TextStyle? enabledTextStyle,
- Color? enabledThumbColor,
- Color? enabledTrackColor,
- TextStyle? disabledTextStyle,
- Color? disabledTrackColor,
- Color? disabledThumbColor,
- GFToggleType? type,
- BoxShape? boxShape,
- BorderRadius? borderRadius,
- Duration duration = const Duration(milliseconds: 400),
Creates toggle button to switch between states onChanged.
Implementation
const GFToggle(
{Key? key,
required this.onChanged,
required this.value,
this.enabledText,
this.disabledText,
this.enabledTextStyle,
this.enabledThumbColor,
this.enabledTrackColor,
this.disabledTextStyle,
this.disabledTrackColor,
this.disabledThumbColor,
this.type,
this.boxShape,
this.borderRadius,
this.duration = const Duration(milliseconds: 400)})
: super(key: key);