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 remove GetX controller Flutter?
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 moreWhat is the use of get in Flutter?
Get centralizes the main resources for development (State, dependency and route management), allowing you to add a single package to your pubspec, and start working . After a Flutter update, the only thing you need to do is update the Get dependency, and get to work. Get also resolves compatibility issues.
Read moreHow does GetX work in Flutter?
To integrate GetX into the application. go to the GetX Documentation, copy get: ^4.3. 8 , and add it to the project pubspec. yaml file , under the dependencies section and then run the pub get command. This will install the GetX ecosystem to your project.21 Eyl 2021
Read moreHow does GetX work in Flutter?
To integrate GetX into the application. go to the GetX Documentation, copy get: ^4.3. 8 , and add it to the project pubspec. yaml file , under the dependencies section and then run the pub get command. This will install the GetX ecosystem to your project.21 Eyl 2021
Read moreWhat is OBX in GetX Flutter?
Obx class Null safety The simplest reactive widget in GetX . Just pass your Rx variable in the root scope of the callback to have it automatically registered for changes.
Read moreWhat can I use instead of setState in 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