How do I access the WidgetLocation property in iOS 17?

I see that iOS 17 includes a new WidgetLocation property: https://developer.apple.com/documentation/widgetkit/widgetlocation

But I don't know how I can access it in order to develop different behavior depending on the location of the widget.

Thanks!

How do I access the WidgetLocation property in iOS 17?
 
 
Q