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/flutter ( 5797): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 5797): The following assertion was thrown building FutureBuilder<void>(dirty, state:
I/flutter ( 5797): _FutureBuilderState<void>#ae63d):
I/flutter ( 5797): Object/factory with type ThemeService is not registered inside GetIt.
I/flutter ( 5797): (Did you accidentally do GetIt sl=GetIt.instance(); instead of GetIt sl=GetIt.instance;
I/flutter ( 5797): Did you forget to register it?)
I/flutter ( 5797): 'package:get_it/get_it_impl.dart':
I/flutter ( 5797): Failed assertion: line 298 pos 9: 'instanceFactory != null'
I/flutter ( 5797):
I/flutter ( 5797): The relevant error-causing widget was:
I/flutter ( 5797): FutureBuilder<void>
package:wine_cellar/main.dart:28
I/flutter ( 5797):
I/flutter ( 5797): When the exception was thrown, this was the stack:
Then in app I'm accessing the themeservice however this is what throws the error. The services should have been instantiated already and should not throw the error. Anyone knows why I would really like to know! =)
Strange, my reply was not received by Github. But you are exactly right. Always provide the Generic type. then you would have seen a type error in your first approach.
Uh oh!
There was an error while loading. Please reload this page.
This is how i setup my singletons in the main function.
This is the error stack
Then in app I'm accessing the themeservice however this is what throws the error. The services should have been instantiated already and should not throw the error. Anyone knows why I would really like to know! =)
The text was updated successfully, but these errors were encountered: