Skip to Content
Forui 0.12.0 is released 🎉

Switch

A toggle switch component that allows users to enable or disable a setting with a sliding motion.

CLI

To generate and customize this style:

dart run forui style create switch

Usage

FSwitch(...)

FSwitch( style: FSwitchStyle(...), label: const Text('Airplane Mode'), description: const Text('Turn on airplane mode to disable all wireless connections.'), error: const Text('Please turn on airplane mode.'), semanticsLabel: 'Airplane Mode', value: true, onChange: (value) {}, enabled: true, autofocus: true, );

Examples

Disabled

Form

Last updated on