Listen to Theme Switcher Event or Read the Current Theme Mode State
Hey, I would like to know how a widget (a ChartWidget) is aware of the current theme mode.
The goal is, I want the chart border color changes depending on the current theme mode.
If it is dark, I want to use lighter colors for better contrast.
If the theme is system (light), the changes to another color.
While researching, I found out that the theme swticher in filament has the following component structure.
`
From this piece I see that an event is dispatched.
I guess this is a livewire event, isn't it?
When I try to listen in with the On attribute
I receive the following error.
Is there another way or approach to acccess the current theme mode?
Thanks in advance for any hint/help.
0 Replies