applyTheme method
Apply colors from a GeneratedPalette to this component's state.
This method is called when the theme changes or when a new palette is generated. It should update all color properties based on the palette's values.
Implementation should use ThemeColorMapper.forComponent() for component-specific color resolution.
Implementation
@override
void applyTheme(GeneratedPalette palette) {
super.applyTheme(palette);
final colors = ThemeColorMapper.forComponent(palette, componentName);
// Rest state - Text colors
restTitleColorLight = colors.restTextColorLight;
restTitleColorDark = colors.restTextColorDark;
restSubtitleColorLight = ThemeColorMapper.getSecondaryTextColor(palette, Brightness.light);
restSubtitleColorDark = ThemeColorMapper.getSecondaryTextColor(palette, Brightness.dark);
restTimeColorLight = ThemeColorMapper.getSecondaryTextColor(palette, Brightness.light);
restTimeColorDark = ThemeColorMapper.getSecondaryTextColor(palette, Brightness.dark);
// Rest state - Accent colors (play button, progress fill, control icons)
restPlayButtonColorLight = colors.accentColorLight;
restPlayButtonColorDark = colors.accentColorDark;
restProgressFillColorLight = colors.accentColorLight;
restProgressFillColorDark = colors.accentColorDark;
restControlIconColorLight = colors.accentColorLight;
restControlIconColorDark = colors.accentColorDark;
// Disabled state
disabledTitleColorLight = colors.disabledTextColorLight;
disabledTitleColorDark = colors.disabledTextColorDark;
disabledPlayButtonColorLight = colors.disabledIconColorLight;
disabledPlayButtonColorDark = colors.disabledIconColorDark;
disabledProgressFillColorLight = colors.disabledIconColorLight;
disabledProgressFillColorDark = colors.disabledIconColorDark;
// Update border color
borderColor = colors.accentColorLight;
}