Toggle Switch - FUIInputToggleSwitch

The FUIInputToggleSwitch is a user-friendly on/off switch component available within the UI kit.
Widget Class Location
The FUIInputToggleSwitch widget classes could be found in:
Widget Theme Location
The FUIInputToggleSwitch class is the theme class holds the default theme variables/values.
Accessing the theme
To access the theme class object, do the following:
Usage

Below are illustrative examples of the UI Kit’s toggle switch in various common usage scenarios:
Customizable active / inactive

The toggle switch’s active/inactive (true/false) UI display could be customized, as follows:
Other configurations

Certain aspects of the FUIInputToggleSwitch can be controlled programmatically using the FUIInputFieldToggleController.
Enable / disable the toggle FUIInputToggleSwitch
Configure readonly on FUIInputToggleSwitch
Value assignment on FUIInputToggleSwitch
Parameters
Parameters | Description |
|---|---|
FUIInputFieldToggleController? fuiInputFieldToggleController | The controller for the |
bool initialValue | The initial value for the toggle switch. |
ValueChanged\<bool\> onChanged | The call back function on any value change. |
FUIInputSize fuiInputSize | Configure the display size of the toggle switch. |
FUIColorScheme fuiColorScheme | The color scheme for the |
bool showOnOff | Shows On/Off as label (The default doesn't have a label). |
Widget? activeText | Custom active label text. |
Widget? inactiveText | Custom inactive label text. |
Color? activeColor | Custom active color. |
Color? inactiveColor | Custom inactive color. |
Color? toggleColor | Custom toggle color. |
Color? activeToggleColor | Custom active toggle color (background). |
Color? inactiveToggleColor | Custom active toggle color (background). |
BoxBorder? switchBorder | Custom switch border. |
BoxBorder? activeSwitchBorder | Custom active switch border. |
BoxBorder? inactiveSwitchBorder | Custom inactive switch border. |
BoxBorder? toggleBorder | Custom toggle switch border. |
BoxBorder? activeToggleBorder | Custom active toggle switch border. |
BoxBorder? inactiveToggleBorder | Custom inactive toggle switch border. |
Widget? activeIcon | Custom icon when the toggle is on 'active' state. |
Widget? inactiveIcon | Custom icon when the toggle is on 'inactive' state. |
Duration? toggleAniDuration | Custom animation duration of the toggle while switching. |
Curve? toggleAniCurve | Custom animation curve of the toggle while switching. |
bool readOnly | Set the |
bool enabled | Enable/disable the |
Duration? enableOpacityAniDuration | Custom animation duration of the toggle opacity while switching. |
Curve? enableOpacityAniCurve | Custom animation curve of the toggle opacity while switching. |