FormeCheckboxTile constructor

FormeCheckboxTile({
  1. Key? key,
  2. String? name,
  3. bool? initialValue = false,
  4. FormeAsyncValidator<bool?>? asyncValidator,
  5. Duration? asyncValidatorDebounce,
  6. AutovalidateMode? autovalidateMode,
  7. FormeFieldDecorator<bool?>? decorator,
  8. bool enabled = true,
  9. FocusNode? focusNode,
  10. FormeFieldInitialized<bool?>? onInitialized,
  11. FormeFieldSetter<bool?>? onSaved,
  12. FormeFieldStatusChanged<bool?>? onStatusChanged,
  13. int? order,
  14. bool quietlyValidate = false,
  15. bool readOnly = false,
  16. bool requestFocusOnUserInteraction = true,
  17. FormeFieldValidationFilter<bool?>? validationFilter,
  18. FormeValidator<bool?>? validator,
  19. bool tristate = false,
  20. Color? activeColor,
  21. bool autofocus = false,
  22. OutlinedBorder? checkBoxShape,
  23. Color? checkColor,
  24. EdgeInsets? contentPadding,
  25. ListTileControlAffinity controlAffinity = ListTileControlAffinity.platform,
  26. bool dense = false,
  27. bool? enableFeedback,
  28. bool isThreeLine = false,
  29. Widget? secondary,
  30. bool selected = false,
  31. Color? selectedTileColor,
  32. OutlinedBorder? shape,
  33. BorderSide? side,
  34. Widget? subtitle,
  35. Color? tileColor,
  36. Widget? title,
  37. 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();
                  },
          );
        },
      );