How to define darkmode in widget?

I wrote this on my code

If (Device.isUsingDarkAppearance()){
  //is dark code
  //is light code

It works in the app but not on homescreen widget

A short search gave me this thread with an answer at the bottom:

Hope it helps!

1 Like

Thanks but still not working :confused: