FItemContentStyle.inherit constructor
FItemContentStyle.inherit({})
Creates a FItemContentStyle that inherits its properties.
Implementation
factory FItemContentStyle.inherit({
required FColors colors,
required FTypography typography,
required Color prefix,
required Color foreground,
required Color mutedForeground,
required bool touch,
}) {
final disabledMutedForeground = colors.disable(mutedForeground);
return FItemContentStyle(
prefixIconStyle: .from(
IconThemeData(color: prefix, size: typography.md.fontSize),
variants: {
[.disabled]: .delta(color: colors.disable(prefix)),
},
),
titleTextStyle: .from(
typography.sm.copyWith(color: foreground),
variants: {
[.disabled]: .delta(color: colors.disable(foreground)),
},
),
subtitleTextStyle: .from(
typography.xs.copyWith(color: mutedForeground),
variants: {
[.disabled]: .delta(color: disabledMutedForeground),
},
),
detailsTextStyle: .from(
typography.xs.copyWith(color: mutedForeground),
variants: {
[.disabled]: .delta(color: disabledMutedForeground),
},
),
suffixIconStyle: .from(
IconThemeData(color: mutedForeground, size: typography.md.fontSize),
variants: {
[.disabled]: .delta(color: disabledMutedForeground),
},
),
suffixedPadding: touch ? const .fromSTEB(10, 12.5, 6, 12.5) : const .fromSTEB(10, 6.5, 5, 6.5),
unsuffixedPadding: touch
? const .symmetric(horizontal: 10, vertical: 12.5)
: const .symmetric(horizontal: 10, vertical: 6.5),
);
}