How do you avoid disposal in flutter?

When you write MyAnimatedWidget() in your code, this means that you initiate a new instance of widget again that’s why the old one is getting disposed because it isn’t used anymore. You can create a field of type MyAnimatedWidget() inside your class and return it with the opacity or not .

Sizin İçin Seçtik  Does 5G work while flying?

Leave a Reply

Your email address will not be published. Required fields are marked *