Checkbox constructor
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 onChanged(
- 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,
),
);