resolve method

KiteTypography resolve(
  1. KiteColors colors
)

Applies the active Kite color palette to typography.

Typography controls font metrics. KiteColors remains the source of truth for content colors.

Implementation

KiteTypography resolve(KiteColors colors) {
  return copyWith(
    display: display.copyWith(color: colors.textPrimary),
    h1: h1.copyWith(color: colors.textPrimary),
    h2: h2.copyWith(color: colors.textPrimary),
    h3: h3.copyWith(color: colors.textPrimary),
    title: title.copyWith(color: colors.textPrimary),
    bodyLarge: bodyLarge.copyWith(color: colors.textPrimary),
    body: body.copyWith(color: colors.textPrimary),
    bodySmall: bodySmall.copyWith(color: colors.textSecondary),
    label: label.copyWith(color: colors.textPrimary),
    labelSmall: labelSmall.copyWith(color: colors.textSecondary),
    caption: caption.copyWith(color: colors.textSecondary),
  );
}