FItemContentStyle.inherit constructor
FItemContentStyle.inherit({
- required FColors colors,
- required FTypography typography,
- required Color prefix,
- required Color foreground,
- required Color mutedForeground,
- required EdgeInsetsGeometry suffixedPadding,
- required EdgeInsetsGeometry unsuffixedPadding,
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 EdgeInsetsGeometry suffixedPadding,
required EdgeInsetsGeometry unsuffixedPadding,
}) {
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: suffixedPadding,
unsuffixedPadding: unsuffixedPadding,
);
}