Move Get. put from being a field of MainScreen to inside its build() method. The Controller can then be disposed when MainScreen is popped .
Read moreHow do I get rid of Flutter GetX controller?
Move Get. put from being a field of MainScreen to inside its build() method. The Controller can then be disposed when MainScreen is popped .
Read moreWhat is get put in GetX?
Getx allows you to perform Dependency injection with just one line of code: final cartController = Get. put(CartController()); We have injected the cartController into our UI so that we can access the data on the controller.21 Eyl 2021
Read moreWhat is get put in GetX?
Getx allows you to perform Dependency injection with just one line of code: final cartController = Get. put(CartController()); We have injected the cartController into our UI so that we can access the data on the controller.21 Eyl 2021
Read moreHow do I use Getstate instead of GetX?
The Getx state manager is easier than using setState. You just need to add a “. obs” at the end of your variable, and wrap the widget you want to change within a Obx() .
Read moreHow do I use Getstate instead of GetX?
The Getx state manager is easier than using setState. You just need to add a “. obs” at the end of your variable, and wrap the widget you want to change within a Obx() .
Read moreHow do I get rid of GetX controller?
While using the Get package in your Flutter project, sometimes you might need to remove Get Controller manually. In order to do so, you can simply call Get. delete function.
Read more