Open khan33 opened 10 months ago
I'm having trouble updating the state variable's value within the partial sheet's content. The code below works well with SwiftUI's sheet view.
struct DemoView: View {
@State var buttonTxt: String = "Start" @State var issheet: Bool = false var body: some View { VStack { Button { issheet.toggle() } label: { Text("Button") .foregroundColor(Color.white) .padding() .background(Color.red) } } .partialSheet(isPresented: $issheet, content: { Button { buttonTxt = "Stop" } label: { Text(buttonTxt) .foregroundColor(Color.white) .frame(width: 180, height: 55) .padding() .background(Color.red) } }) .padding() }
}
I'm having trouble updating the state variable's value within the partial sheet's content. The code below works well with SwiftUI's sheet view.
struct DemoView: View {
}