1

I have a segmented control and, in one of its pages, I have a webview. I want to close my web view automatically when I change page from the segmented control. Some suggestion?

2 Answers 2

1

you may work on the dispose event of your StateFullWidget and close your webview when your component or page disposed :

@override
void dispose() {
  // close the webview here
  super.dispose();
}
0
0

No need to do dispose, just use Navigator.pushReplacement will take care of all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.