How can I close it to open another one ? #99
-
Hi, Awesome library ! I have Button inside bottomsheet I notice you didn't have a boolean value so I didn't know how can I do this scenario |
Beta Was this translation helpful? Give feedback.
Answered by
lucaszischka
Sep 6, 2022
Replies: 1 comment
-
Im not quite sure what you want to do. A code snipped would be great next time. Also this is not a issue but a question. Converting to discussion. However I think this is what you want: @State var bottomSheetPosition1: Bool = .relative(0.4)
@State var bottomSheetPosition2: Bool = .hidden
var body: some View {
// Your view
.bottomSheet(bottomSheetPosition: self.$bottomSheetPosition1, …)
.bottomSheet(bottomSheetPosition: self.$bottomSheetPosition2, …)
}
func yourButton() -> Void {
// Close one sheet
self.bottomSheetPosition1 = .hidden
// Open the other one
self.bottomSheetPosition2 = .relative(0.6)
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lucaszischka
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Im not quite sure what you want to do. A code snipped would be great next time. Also this is not a issue but a question. Converting to discussion.
However I think this is what you want: