Reputation: 22906
This page says: https://pub.dev/packages/get
Get.put( Instance() )
// Access data from one screen in another screen easily.
So, what would be the difference between
Instance obj;
Instance obj = Instance()
Instance obj = Get.put( Instance() )
?
Upvotes: 1
Views: 297
Reputation: 176
difference is Getx has controll over the instance
for example you can remove the instance from memory with getx and onClose will be called
or you can find the instance in memory with Get.find(), and other benefits of letting Getx manage the instance
1 doesn't mean anything
2 has the problem that i said
3 Instance obj =
is not required
Upvotes: 1