FButtonStyle.inherit constructor
FButtonStyle.inherit({
- required FColors colors,
- required FTypography typography,
- required FStyle style,
- required Color color,
- required Color foregroundColor,
Creates a FButtonStyle that inherits its properties.
Implementation
FButtonStyle.inherit({
required FColors colors,
required FTypography typography,
required FStyle style,
required Color color,
required Color foregroundColor,
}) : this(
decoration: FWidgetStateMap({
WidgetState.disabled: BoxDecoration(borderRadius: style.borderRadius, color: colors.disable(color)),
WidgetState.hovered | WidgetState.pressed: BoxDecoration(
borderRadius: style.borderRadius,
color: colors.hover(color),
),
WidgetState.any: BoxDecoration(borderRadius: style.borderRadius, color: color),
}),
focusedOutlineStyle: style.focusedOutlineStyle,
contentStyle: FButtonContentStyle.inherit(
typography: typography,
enabled: foregroundColor,
disabled: colors.disable(foregroundColor, colors.disable(color)),
),
iconContentStyle: FButtonIconContentStyle(
iconStyle: FWidgetStateMap({
WidgetState.disabled: IconThemeData(
color: colors.disable(foregroundColor, colors.disable(color)),
size: 20,
),
WidgetState.any: IconThemeData(color: foregroundColor, size: 20),
}),
),
tappableStyle: style.tappableStyle,
);