Flutter Switch Widget

bool _value = true;

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

Subscribe For Daily Updates

Flutter Questions
Android Questions