FFormFieldStyle.inherit constructor
FFormFieldStyle.inherit({
- required FColors colors,
- 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: .w600),
WidgetState.disabled: typography.sm.copyWith(color: colors.disable(colors.primary), fontWeight: .w600),
WidgetState.any: typography.sm.copyWith(color: colors.primary, 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: .w600);