- Flutter Widget Livebook

Switch

A material design switch.

Example

bool _value = true;

Switch(
  value: _value,
  onChanged: (bool newValue) {
    setState(() {
      _value = newValue;
    });
  },
)

Related Links

  1. Example
  2. Related Links