You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the method to check if a singleton is registered, but it seems that i am doing something wrong.
This is an extract of the code and if i use this way always return false and always throw the exception with the next line that is already registered the singleton if (!locator.isRegistered(instance: ControlCenterViewModel))
But this way if the instance is not loaded throw an exception, to make sure that ControlCenterViewModel is in get_it. if (!locator.isRegistered(instance: locator<ControlCenterViewModel>()))
Please help, how i can make this right.
Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
I am trying to use the method to check if a singleton is registered, but it seems that i am doing something wrong.
This is an extract of the code and if i use this way always return false and always throw the exception with the next line that is already registered the singleton
if (!locator.isRegistered(instance: ControlCenterViewModel))
But this way if the instance is not loaded throw an exception, to make sure that ControlCenterViewModel is in get_it.
if (!locator.isRegistered(instance: locator<ControlCenterViewModel>()))
Please help, how i can make this right.
Thanks!
The text was updated successfully, but these errors were encountered: