Replies: 1 comment
-
Here is one approach :
Please note that : |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I was wondering if there's a way I can get back a value from a sheet. Let's say I have a basic application which has a screen with a
Text
which says "false". When the app opens a model sheet comes up which has a simple toggle (initial state is false) and a Done button and the Cancel button.a) After the sheet comes up and I play with the toggle if I swipe down the sheet a little (so it's not dismissed, but I can see the content behind) I notice that the Text of the main view changed.
My goal is to only see the changes in the main view if the done button is tapped on the sheet. So prevent the main view to rerender until done is tapped and I got the result back from the sheet.
b) It would be even better if I the sheet state would be optional, and the main view's
Text
initially would say "Toggle is not set yet". And after the modal is shown if I tap the cancel button nothing changes, if I tap the done button the state becomes false (since that's it initial state of the toggle).My code is so far (which is the a) case):
Beta Was this translation helpful? Give feedback.
All reactions