I see you asked it a long time ago, hope still this can help.
I had the same problem and this is how I solved it. (showing on your code)
@State private var minimum: Double = 98.0
@State private var maximum: Double = 1000000.0
var filteredProducts: [Product]
var body: some View {
List {
Section(header: Text("Filters")){
DisclosureGroup("Price range") {
Slider(value: $minimum, in: 98...maximum) {
Text("\(minimum)")
} minimumValueLabel: {
Text("min")
} maximumValueLabel: {
Text("\(maximum, specifier: "%.0f")")
}
Slider(value: $maximum, in: minimum...1000000) {
Text("\(maximum)")
} minimumValueLabel: {
Text("\(minimum, specifier: "%.0f")
} maximumValueLabel: {
Text("\(maximum, specifier: "%.0f")")
}
}
}
}
}
Basically, give your Min value Slider your @state max value and vice versa for the Max value Slider. And put corresponding labels: max value label to min value slider and vice versa.