5 Answers. Move Get. put from being a field of MainScreen to inside its build() method. The Controller can then be disposed when MainScreen is popped .5 Eyl 2021
Read moreWhat dispose flutter?
dispose method used to release the memory allocated to variables when state object is removed . For example, if you are using a stream in your application then you have to release memory allocated to the stream controller. Otherwise, your app may get a warning from the PlayStore and AppStore about memory leakage.
Read moreHow do you use GetX in flutter?
Let’s get going with GetX state management
Read more