Flutter – InheritedWidget – dispose

Posted by Andre Scott | Updated on

Flutter – InheritedWidget – dispose. InheritedWidget behaves the same way as other Widget do. Their lifetime is really short: Usually not longer than one build call.

If you want to store data for longer, InheritedWidget is not what you want. You’ll need a State for that.

Which also means that ultimately, you can use State’s dispose for your bloc dispose.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers