FormeFluentCheckbox constructor
FormeFluentCheckbox({
- Key? key,
- String? name,
- bool initialValue = false,
- FormeAsyncValidator<
bool> ? asyncValidator, - Duration? asyncValidatorDebounce,
- AutovalidateMode? autovalidateMode,
- FormeFieldDecorator<
bool> ? decorator, - bool enabled = true,
- FocusNode? focusNode,
- FormeFieldInitialized<
bool> ? onInitialized, - FormeFieldSetter<
bool> ? onSaved, - FormeFieldStatusChanged<
bool> ? onStatusChanged, - int? order,
- bool quietlyValidate = false,
- bool readOnly = false,
- bool requestFocusOnUserInteraction = true,
- FormeFieldValidationFilter<
bool> ? validationFilter, - FormeValidator<
bool> ? validator, - bool autofocus = false,
- Widget? content,
- String? semanticLabel,
- CheckboxThemeData? style,
Implementation
FormeFluentCheckbox({
super.key,
super.name,
super.initialValue = false,
super.asyncValidator,
super.asyncValidatorDebounce,
super.autovalidateMode,
super.decorator,
super.enabled = true,
super.focusNode,
super.onInitialized,
super.onSaved,
super.onStatusChanged,
super.order,
super.quietlyValidate = false,
super.readOnly = false,
super.requestFocusOnUserInteraction = true,
super.validationFilter,
super.validator,
this.autofocus = false,
this.content,
this.semanticLabel,
this.style,
}) : super.allFields(
builder: (state) {
return Checkbox(
checked: state.value,
onChanged: state.readOnly
? null
: (v) {
state.didChange(v ?? false);
state.requestFocusOnUserInteraction();
},
style: style,
content: content,
semanticLabel: semanticLabel,
focusNode: state.focusNode,
autofocus: autofocus,
);
},
);