Dynamic Class in Native

I tried to apply a dynamic class to a native page, but i did not work.  I wonder now if it is not applicable to native apps.  If so then I have to dublicate the widget and set other visiblity to show background in another color. But this is not usefull. Is there a beter solution? if $currentObject/_IsAangeraakt  then 'background-success'  else 'background-primary'
1 answers

Did you update the entities using microflow or nanoflow? I had the same problem and if I update the data using nanoflow all is working fine.