GitHub

    Table of contents

  1. Example
  2. Related Links

CupertinoSwitch

Edit this page

An iOS-style switch.

Example

MergeSemantics(
  child: ListTile(
    title: Text('Lights'),
    trailing: CupertinoSwitch(
      value: _lights,
      onChanged: (bool value) { setState(() { _lights = value; }); },
    ),
    onTap: () { setState(() { _lights = !_lights; }); },
  ),
)

Related Links