Open LanceQuare opened 1 year ago
遇到相同的问题,没有这个方法Get.putAsync()
same issue here
maybe like this?
await Get.putOrFind<Repository>( () => Repository()).onReady();
I also encountered this problem, I changed
await Get.putAsync(() => AuthService().init());
to
Get.put(AuthService());
await Get.find<AuthService>().init();
If I don't do this, my authentication status will be returned too late, so that the page I open through shortcut will not be able to obtain the correct authentication status.
Note that this will have a side effect, init will be executed twice, perhaps you can move the code from init into a custom function to avoid this problem
ATTENTION: DO NOT USE THIS FIELD TO ASK SUPPORT QUESTIONS. USE THE PLATFORM CHANNELS FOR THIS. THIS SPACE IS DEDICATED ONLY FOR FEATURE REQUESTS
Is your feature request related to a problem? Please describe. Since Get.putAsync seems removed or deprecated from Getx, what is proper way to put GetxSevice, please advise.
Describe the solution you'd like Add Get.putAsync() back or other alternatives.
Describe alternatives you've considered N/A