FCheckboxStyle.inherit constructor

FCheckboxStyle.inherit({
  1. required FColorScheme colorScheme,
  2. required FStyle style,
})

Creates a FCheckboxStyle that inherits its properties from the given parameters.

Implementation

FCheckboxStyle.inherit({required FColorScheme colorScheme, required FStyle style})
    : this(
        labelLayoutStyle: FLabelStyles.inherit(style: style).horizontalStyle.layout,
        focusedOutlineStyle: FFocusedOutlineStyle(
          color: style.focusedOutlineStyle.color,
          borderRadius: BorderRadius.circular(4),
        ),
        enabledStyle: FCheckboxStateStyle(
          labelTextStyle: style.enabledFormFieldStyle.labelTextStyle,
          descriptionTextStyle: style.enabledFormFieldStyle.descriptionTextStyle,
          borderColor: colorScheme.primary,
          iconColor: colorScheme.primaryForeground,
          checkedBackgroundColor: colorScheme.primary,
          uncheckedBackgroundColor: colorScheme.background,
        ),
        disabledStyle: FCheckboxStateStyle(
          labelTextStyle: style.disabledFormFieldStyle.labelTextStyle,
          descriptionTextStyle: style.disabledFormFieldStyle.descriptionTextStyle,
          borderColor: colorScheme.disable(colorScheme.primary),
          iconColor: colorScheme.disable(colorScheme.primaryForeground),
          checkedBackgroundColor: colorScheme.disable(colorScheme.primary),
          uncheckedBackgroundColor: colorScheme.disable(colorScheme.background),
        ),
        errorStyle: FCheckboxErrorStyle(
          labelTextStyle: style.errorFormFieldStyle.labelTextStyle,
          descriptionTextStyle: style.errorFormFieldStyle.descriptionTextStyle,
          errorTextStyle: style.errorFormFieldStyle.errorTextStyle,
          borderColor: colorScheme.error,
          iconColor: colorScheme.errorForeground,
          checkedBackgroundColor: colorScheme.error,
          uncheckedBackgroundColor: colorScheme.background,
        ),
      );