FItemStyles.inherit constructor
FItemStyles.inherit({
- required FColors colors,
- required FTypography typography,
- required FStyle style,
- required bool touch,
Creates a FItemStyles that inherits its properties.
Implementation
factory FItemStyles.inherit({
required FColors colors,
required FTypography typography,
required FStyle style,
required bool touch,
}) {
final primary = FItemStyle.inherit(colors: colors, typography: typography, style: style, touch: touch);
return FItemStyles(
FVariants.from(
primary,
variants: {
[.primary]: primary,
[.destructive]: .delta(
contentStyle: FItemContentStyle.inherit(
colors: colors,
typography: typography,
prefix: colors.destructive,
foreground: colors.destructive,
mutedForeground: colors.destructive,
touch: touch,
),
rawContentStyle: FRawItemContentStyle.inherit(
colors: colors,
typography: typography,
prefix: colors.primary,
color: colors.primary,
touch: touch,
),
),
},
),
);
}