applyTheme method

void applyTheme(
  1. HubbleThemeData theme
)

Implementation

void applyTheme(HubbleThemeData theme) {
  for (final shadow in shadow ?? []) {
    shadow.inflateColors(theme);
  }

  color?.applyTheme(theme);
  backgroundColor?.applyTheme(theme);
  decorationColor?.applyTheme(theme);
  foregroundGradient?.applyTheme(theme);
  backgroundGradient?.applyTheme(theme);

  textStyle = base.copyWith(
    backgroundColor: backgroundColor?.color,
    decorationColor: decorationColor?.color,
    shadows: shadow?.map((e) => e.shadow).toList(),
    foreground: foreground(),
    background: backgroundGradient?.getPaint(),
  );
}