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 moreWhat is get put in Flutter?
The Flutter GetX Ecosystem ~ State Management Get. put makes the dependency available to all the child routes . So, in case we need to access the same instance in some other class, we can do that using Get.
Read moreWhat is get put in Flutter?
The Flutter GetX Ecosystem ~ State Management Get. put makes the dependency available to all the child routes . So, in case we need to access the same instance in some other class, we can do that using Get.
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 more