FBreadcrumbStyle.inherit constructor
FBreadcrumbStyle.inherit({
- required FColors colors,
- required FTypography typography,
- required FStyle style,
- required bool touch,
Creates a FBreadcrumbStyle that inherits its properties.
Implementation
factory FBreadcrumbStyle.inherit({
required FColors colors,
required FTypography typography,
required FStyle style,
required bool touch,
}) {
EdgeInsetsGeometry padding;
EdgeInsetsGeometry collapsedPadding;
if (touch) {
padding = const .symmetric(horizontal: 6, vertical: 10);
collapsedPadding = const .symmetric(horizontal: 6, vertical: 13);
} else {
padding = const .symmetric(horizontal: 6);
collapsedPadding = const .symmetric(horizontal: 6);
}
return FBreadcrumbStyle(
textStyle: FVariants.from(
typography.sm.copyWith(color: colors.mutedForeground),
variants: {
[.hovered, .pressed]: .delta(color: colors.foreground),
//
[.selected]: .delta(color: colors.foreground),
[.selected.and(.hovered), .selected.and(.pressed)]: .delta(color: colors.hover(colors.foreground)),
},
),
iconStyle: IconThemeData(color: colors.mutedForeground, size: typography.md.fontSize),
tappableStyle: style.tappableStyle.copyWith(motion: FTappableMotion.none),
focusedOutlineStyle: style.focusedOutlineStyle,
padding: padding,
collapsedPadding: collapsedPadding,
);
}