FormeCheckboxTile constructor
FormeCheckboxTile({
- 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 tristate = false,
- Color? activeColor,
- bool autofocus = false,
- OutlinedBorder? checkBoxShape,
- Color? checkColor,
- EdgeInsets? contentPadding,
- ListTileControlAffinity controlAffinity = ListTileControlAffinity.platform,
- bool dense = false,
- bool? enableFeedback,
- bool isThreeLine = false,
- Widget? secondary,
- bool selected = false,
- Color? selectedTileColor,
- OutlinedBorder? shape,
- BorderSide? side,
- Widget? subtitle,
- Color? tileColor,
- Widget? title,
- VisualDensity? visualDensity,
Implementation
FormeCheckboxTile({
super.key,
super.name,
bool? 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.tristate = false,
this.activeColor,
this.autofocus = false,
this.checkBoxShape,
this.checkColor,
this.contentPadding,
this.controlAffinity = ListTileControlAffinity.platform,
this.dense = false,
this.enableFeedback,
this.isThreeLine = false,
this.secondary,
this.selected = false,
this.selectedTileColor,
this.shape,
this.side,
this.subtitle,
this.tileColor,
this.title,
this.visualDensity,
}) : super.allFields(
initialValue: tristate ? initialValue : initialValue ?? false,
builder: (state) {
final bool readOnly = state.readOnly;
final bool? value = state.value;
return CheckboxListTile(
enableFeedback: enableFeedback,
focusNode: state.focusNode,
visualDensity: visualDensity,
side: side,
checkboxShape: checkBoxShape,
enabled: state.enabled,
selected: selected,
value: value,
activeColor: activeColor,
checkColor: checkColor,
tileColor: tileColor,
title: title,
subtitle: subtitle,
isThreeLine: isThreeLine,
dense: dense,
secondary: secondary,
controlAffinity: controlAffinity,
autofocus: autofocus,
contentPadding: contentPadding,
tristate: tristate,
shape: shape,
selectedTileColor: selectedTileColor,
onChanged: readOnly
? null
: (value) {
state.didChange(value);
state.requestFocusOnUserInteraction();
},
);
},
);