Getx | obs - not updating data in Controller properly | Flutter

Tue, Mar 26, 2024

Read in 1 minutes

This is a very common issue when working with Getx on flutter. Hopefully the following solution can be of a help for you.

QUESTION: I’m just navigating to a new page on Flutter, as soon as this new page/screen is closed with Get.back() or Navigator.pop(context) “MyController” onDelete() called and controller is not updating variable values properly or saving the old values.

ANSWER: You should call Get.find on the very first screen on your app, so GetX will not delete it:
YourController yourController = Get.find<YourController>();
it worked for me ✅


Shohruh AK





See Also

New App Signing feature provided by Google Play
4 Ways to Close Keyboard in Flutter App
Build Flutter Calculator App - Tutorial for Beginners
Save any file in external storage in Flutter app: Full Guide
Gradient Text Effect in Flutter Without Package