FHeaderStyles.inherit constructor
FHeaderStyles.inherit({
- required FColors colors,
- required FTypography typography,
- required FStyle style,
Creates a FHeaderStyles that inherits its properties.
Implementation
factory FHeaderStyles.inherit({required FColors colors, required FTypography typography, required FStyle style}) {
final root = FHeaderStyle(
systemOverlayStyle: colors.systemOverlayStyle,
titleTextStyle: typography.xl2.copyWith(color: colors.foreground, fontWeight: .w700, height: 1),
actionStyle: .inherit(colors: colors, style: style, size: typography.xl2.fontSize ?? 30, padding: const .all(7)),
padding: style.pagePadding.copyWith(bottom: 10),
);
return FHeaderStyles(
FVariants(
root,
variants: {
[.root]: root,
[.nested]: FHeaderStyle(
systemOverlayStyle: colors.systemOverlayStyle,
titleTextStyle: typography.xl.copyWith(color: colors.foreground, fontWeight: .w600, height: 1),
actionStyle: .inherit(colors: colors, style: style, size: 22, padding: const .all(11)),
padding: style.pagePadding.copyWith(bottom: 10),
),
},
),
);
}