i am unable to take away the content material padding / content material margin from from this house display widget. The widget is of a picture
I’ve tried
ZStack {
if let url = URL(string: imageUrl), !imageUrl.isEmpty {
if let information = attempt? Knowledge(contentsOf: url),
let uiImage = UIImage(information: information) {
Picture(uiImage: uiImage)
.resizable()
.scaledToFill()
.body(maxWidth: .infinity, maxHeight: .infinity)
.ignoresSafeArea()
} else {
Picture(systemName: "xmark.circle.fill")
.resizable()
.scaledToFit()
.foregroundColor(.purple)
.padding()
}
} else {
VStack {
Picture(systemName: "picture")
.resizable()
.scaledToFit()
.foregroundColor(.grey)
.padding()
Textual content("No picture set")
.font(.caption)
.foregroundColor(.secondary)
}
}
}.widgetContentMargins(.none)