FFormFieldStyle.inherit constructor

FFormFieldStyle.inherit({
  1. required FColors colors,
  2. required FTypography typography,
})

Creates a FFormFieldStyle that inherits its properties.

Implementation

FFormFieldStyle.inherit({required FColors colors, required FTypography typography})
  : labelTextStyle = FWidgetStateMap({
      WidgetState.error: typography.sm.copyWith(color: colors.error, fontWeight: FontWeight.w600),
      WidgetState.disabled: typography.sm.copyWith(
        color: colors.disable(colors.primary),
        fontWeight: FontWeight.w600,
      ),
      WidgetState.any: typography.sm.copyWith(color: colors.primary, fontWeight: FontWeight.w600),
    }),
    descriptionTextStyle = FWidgetStateMap({
      WidgetState.error: typography.sm.copyWith(color: colors.mutedForeground),
      WidgetState.disabled: typography.sm.copyWith(color: colors.disable(colors.mutedForeground)),
      WidgetState.any: typography.sm.copyWith(color: colors.mutedForeground),
    }),
    errorTextStyle = typography.sm.copyWith(color: colors.error, fontWeight: FontWeight.w600);