FCheckboxStyle.inherit constructor
FCheckboxStyle.inherit({
- required FColorScheme colorScheme,
- required FStyle style,
Creates a FCheckboxStyle that inherits its properties from the given parameters.
Implementation
FCheckboxStyle.inherit({required FColorScheme colorScheme, required FStyle style})
: animationDuration = const Duration(milliseconds: 100),
curve = Curves.linear,
labelLayoutStyle = FLabelStyles.inherit(style: style).horizontal.layout,
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.primary.withOpacity(0.5),
iconColor: colorScheme.primaryForeground.withOpacity(0.5),
checkedBackgroundColor: colorScheme.primary.withOpacity(0.5),
uncheckedBackgroundColor: colorScheme.background.withOpacity(0.5),
),
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,
);