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 have a class that provide dio object and i register that in get it like this: sl.registerLazySingleton(() => NetworkModuleV2.instance.getDio(sl()));
This is provide dio without accept custom header.
Now i want to an instance of Dio but new dio accept custom header. sl.registerLazySingleton(() => NetworkModuleV2.instance.getDioWithToken(sl()));
Both of two are Dio();
My question is how can i have two object from one class?
The text was updated successfully, but these errors were encountered:
In this case use Named Registration if you need to keep them both around all the time. You can pass a name parameter when registering and also pass a name when accessing the object.
Uh oh!
There was an error while loading. Please reload this page.
I have a class that provide dio object and i register that in get it like this:
sl.registerLazySingleton(() => NetworkModuleV2.instance.getDio(sl()));
This is provide dio without accept custom header.
Now i want to an instance of Dio but new dio accept custom header.
sl.registerLazySingleton(() => NetworkModuleV2.instance.getDioWithToken(sl()));
Both of two are Dio();
My question is how can i have two object from one class?
The text was updated successfully, but these errors were encountered: