FCalendarHeaderStyle.inherit constructor
FCalendarHeaderStyle.inherit({
- required FColors colors,
- required FTypography typography,
- required FIcons icons,
- required FStyle style,
- required bool touch,
Creates a FCalendarHeaderStyle that inherits its properties.
Implementation
factory FCalendarHeaderStyle.inherit({
required FColors colors,
required FTypography typography,
required FIcons icons,
required FStyle style,
required bool touch,
}) {
final buttons = FButtonStyles.inherit(colors: colors, typography: typography, style: style, touch: touch);
final headerTextStyle = (touch ? typography.display.md : typography.display.sm).copyWith(
color: colors.foreground,
fontWeight: .w500,
);
return FCalendarHeaderStyle(
headerDecoration: .from(
ShapeDecoration(shape: RoundedSuperellipseBorder(borderRadius: style.borderRadius.md)),
variants: {
[.hovered, .pressed]: .shapeDelta(color: colors.secondary),
},
),
headerTextStyle: .all(headerTextStyle),
toggleIconStyle: .all(IconThemeData(color: colors.mutedForeground, size: headerTextStyle.fontSize)),
headerFocusedOutlineStyle: style.focusedOutlineStyle,
buttonStyle: touch ? buttons.ghost.md : buttons.ghost.xs,
toggleIcon: icons.chevronRight,
previousIcon: icons.chevronLeft,
nextIcon: icons.chevronRight,
);
}