Control.toggle constructor

Control.toggle({
  1. required String key,
  2. String? description,
  3. String? title,
  4. void onChange(
    1. dynamic
    )?,
  5. bool? value,
  6. Widget? prefixIcon,
})

Implementation

factory Control.toggle({
  required String key,
  String? description,
  String? title,
  void Function(dynamic)? onChange,
  bool? value,
  Widget? prefixIcon,
}) =>
    Control(
      title: title ?? '',
      description: description,
      value: value ?? false,
      onChange: onChange,
      key: key,
      type: ControlType.toggle,
      prefixIcon: prefixIcon,
    );