I have a ProductDetails page that has "write a Review" button. on that button click, it opens a bottom sheet for adding rate and review and a button to submit and dismiss the sheet. I want on dismissing the sheet to hide the "write a Review" button since I want the logged-in user to only review once!! I have created a Boolean Page Variable and on dismissing the sheet I have called excuted callback and assigned the bool variable to true. and on the "write a Review" button I have set the visibility as if 'bool page variable' == false. When testing it is working, right after I add a review and dismiss the bottomsheet the "write a Review" button disappears which is what I want. but when I exit the page and reopen, the button is there!! I don't know why.
How can I hide a button on callback?
Troubleshooting
Note that I have set the Page Variable onPageLoad to false.
No
1
6 replies