Thanks @darkpaw. Here is a simplified version of the code
import SwiftUI
struct DetailView: View {
var body: some View {
ZStack {
GradientBackdrop()
List {
Section {
LabeledValueRow(
label: "Company",
value: "ACME Inc."
)
LabeledValueRow(
label: "Email",
value: "test@example.com"
)
Text("Schedule Appointment")
Text("Add to Favorites")
}
.listRowBackground(
Rectangle()
.background(.thinMaterial)
.colorScheme(.dark)
)
.listRowSeparatorTint(.white.opacity(0.4))
.colorScheme(.dark)
}
.listSectionSpacing(.compact)
.scrollContentBackground(.hidden)
}
}
}
#Preview {
DetailView()
}
What I want to achieve is something like this, where the rows adapt to the underlying color
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: