How to define darkmode in widget?

I wrote this on my code

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

It works in the app but not on homescreen widget
How??

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

Hope it helps!

1 Like

Thanks but still not working :confused: