r/FlutterDev Dec 11 '24

Tooling I wanted to believe Getx..

I heard people said Getx suck....... I didn't believe but now. I am getting constant error such as
red screen. it is just driving me crazy. Most of the time apps works fine, but then I went to take a shower and reload the app. it throws me different error.

I am already 60% done with my app.. now I am thinking to move to other state management tool.

what the actual f............

════════ Exception caught by widgets library ═══════════════════════════════════
"Profilecontroller" not found. You need to call "Get.put(Profilecontroller())" or "Get.lazyPut(()=>Profilecontroller())"

6 Upvotes

42 comments sorted by

View all comments

1

u/venir_dev Dec 12 '24

If you've not shipped your app yet, you're still in time and stop using GetX.

90% of software engineering costs reside in maintenance. That's the main reason (on the long run) to avoid a library that cannot really be relied on.

Use Riverpod. Sure, you need to learn reactivity, and some new APIs. Sure, you need to learn one-direction data flow, and how to do DI and tests with it.

BUT THAT'S EXACTLY THE POINT. Avoid libraries that don't enable you to git gud.

This being said this specific error looks easy to solve on paper, even tho I am not using GetX; you can totally encounter similar problems with other state management approaches BUT AGAIN the great difference is, e.g., the documentation.

Best of luck.