CupertinoSwitch constructor

const CupertinoSwitch({Key key, @required bool value, @required ValueChanged<bool> onChanged, Color activeColor, DragStartBehavior dragStartBehavior: DragStartBehavior.start })

Creates an iOS-style switch.

The value parameter must not be null. The dragStartBehavior parameter defaults to DragStartBehavior.start and must not be null.


const CupertinoSwitch({
  Key key,
  @required this.value,
  @required this.onChanged,
  this.dragStartBehavior = DragStartBehavior.start,
}) : assert(value != null),
     assert(dragStartBehavior != null),
     super(key: key);