Need example on GetConnect usage #938
-
I just discovered GetConnect class in the docs and I'm trying to use it, but I can't figure how to get that properly imported. VSCode simply doesn't know which GetX file should be imported to get GetConnect working. Can you guys give me directions? I tried many different imports, but none of them seems to have the GetConnect class definition. import 'package:get/utils.dart'; |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
import 'package:get/get.dart'; |
Beta Was this translation helpful? Give feedback.
-
Update |
Beta Was this translation helpful? Give feedback.
-
I'm not sure about how GetConnect should be used. Do I need to register it somewhere to be able to use it? I'm importing it directly on my controller like so: // orders controller
But the providers "onInit" method is never called on instantiation and I'm getting "ArgumentError (Invalid argument(s): No host specified in URI" exception. Here goes the related code:
It would be awesome if we had a complete example of how to use it properly. |
Beta Was this translation helpful? Give feedback.
-
How to use |
Beta Was this translation helpful? Give feedback.
Update
get
package on your pubspec to last version