Checkbox constructor

Checkbox({
  1. String? label,
  2. String? name,
  3. bool checked = false,
  4. bool disabled = false,
  5. bool indeterminate = false,
  6. String? error,
  7. FormErrors? errors,
  8. String? helpText,
  9. String? className,
  10. Map<String, Object?> props = const {},
  11. Map<String, Object?> inputProps = const {},
  12. Map<String, Object?> style = const {},
  13. DartStyle? dartStyle,
  14. void onChanged(
    1. Object event
    )?,
})

Creates a checkbox field.

Implementation

Checkbox({
  String? label,
  String? name,
  bool checked = false,
  bool disabled = false,
  bool indeterminate = false,
  String? error,
  FormErrors? errors,
  String? helpText,
  String? className,
  Map<String, Object?> props = const {},
  Map<String, Object?> inputProps = const {},
  Map<String, Object?> style = const {},
  DartStyle? dartStyle,
  void Function(Object event)? onChanged,
}) : super(
        'div',
        props: fieldWrapperProps(
          props: props,
          className: className,
          dartStyle: dartStyle,
          style: style,
        ),
        children: _children(
          label: label,
          name: name,
          checked: checked,
          disabled: disabled,
          indeterminate: indeterminate,
          error: resolveFieldError(name: name, error: error, errors: errors),
          helpText: helpText,
          inputProps: inputProps,
          onChanged: onChanged,
        ),
      );