HubbleButtonStyle.solid constructor
HubbleButtonStyle.solid({
- required HubbleColorPalette colors,
- required HubbleTypography typography,
Implementation
factory HubbleButtonStyle.solid({
required HubbleColorPalette colors,
required HubbleTypography typography,
}) {
return HubbleButtonStyle(
foregroundColor:
const HubbleButtonStateVariant.all(Colors.transparent).copyWith(
enabled: Colors.white.withOpacity(0.5),
),
color: HubbleButtonStateVariant(
enabled: colors.base.primary.dark,
caution: colors.system.error.dark,
pressed: colors.brand.secondary.dark,
progress: colors.base.primary.medium,
disabled: colors.base.tertiary.dark,
success: colors.system.success.dark,
grey: colors.base.tertiary.medium,
),
radius: BorderRadius.circular(100),
textStyle: HubbleButtonStateVariant.all(typography.s15.copyWith(
color: Colors.white,
fontWeight: FontWeight.w600,
height: 1,
)).copyWith(
disabled: typography.s15.copyWith(
color: colors.disabled,
fontWeight: FontWeight.w600,
),
grey: typography.s15.copyWith(
color: colors.textColorDark,
fontWeight: FontWeight.w600,
),
),
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
height: 48,
border: const HubbleButtonStateVariant<Border?>.all(null).copyWith(
disabled: Border.all(width: 1, color: colors.disabled),
),
);
}