Rounded corners of image in a widget not working.

I have three widgets running.

i can show pictures inside the widgets.

i want to have the pictures have rounded corners. I tried the same as you do when you want to do it in the main app. There it works fine. But in the widget view it doesn’t show and breaks the app when you build it.
no error code is given. The widget preview diagnostics doesn’t show any error either.
Rounded corners of image in a widget not working.
 
 
Q