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
classUserStateService {
final appViewStateService =GetIt.I.get<AppViewStateService>();
}
This throws the following error
I/flutter ( 6537): Exception 'package:get_it/get_it_impl.dart': Failed assertion: line 372 pos 7: 'instanceFactory != null': Object/factory with type AppViewStateService is not registered inside GetIt.
package:get_it/get_it_impl.dart:372
I/flutter ( 6537): (Did you accidentally do GetIt sl=GetIt.instance(); instead of GetIt sl=GetIt.instance;
How are we supposed to do this? I'm having a hard time having services registered with
registerSingleton
depend on each other.Example
And
UserStateService
looks like thisThis throws the following error
I also tried this.
Which throws this error
For now I'm forced to change the order of registrations, if there's another way please let me know.
The text was updated successfully, but these errors were encountered: