FStyle.inherit constructor

FStyle.inherit({
  1. required FColorScheme colorScheme,
  2. required FTypography typography,
})

Creates an FStyle that inherits its properties from the given FColorScheme and FTypography.

Implementation

FStyle.inherit({
  required FColorScheme colorScheme,
  required FTypography typography,
}) : this(
        enabledFormFieldStyle: FFormFieldStyle.inherit(
          labelColor: colorScheme.primary,
          descriptionColor: colorScheme.mutedForeground,
          typography: typography,
        ),
        disabledFormFieldStyle: FFormFieldStyle.inherit(
          labelColor: colorScheme.disable(colorScheme.primary),
          descriptionColor: colorScheme.disable(colorScheme.mutedForeground),
          typography: typography,
        ),
        errorFormFieldStyle: FFormFieldErrorStyle.inherit(
          labelColor: colorScheme.error,
          descriptionColor: colorScheme.mutedForeground,
          errorColor: colorScheme.error,
          typography: typography,
        ),
        focusedOutlineStyle: FFocusedOutlineStyle(
          color: colorScheme.primary,
          borderRadius: const BorderRadius.all(Radius.circular(8)),
        ),
        iconStyle: FIconStyle(
          color: colorScheme.primary,
          size: 20,
        ),
      );