We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
here is my minimal repo: https://github.com/plibr/tutorial
I am receiving this error when I run: E/flutter (21679): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: 'package:get_it/get_it_impl.dart': Failed assertion: line 372 pos 7: 'instanceFactory != null': Object/factory with type TutorialsApiService is not registered inside GetIt. E/flutter (21679): (Did you accidentally do GetIt sl=GetIt.instance(); instead of GetIt sl=GetIt.instance; E/flutter (21679): Did you forget to register it?) E/flutter (21679): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61) E/flutter (21679): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5) E/flutter (21679): #2 _GetItImplementation._findFactoryByNameAndType (package:get_it/get_it_impl.dart:372:7) E/flutter (21679): #3 _GetItImplementation.get (package:get_it/get_it_impl.dart:393:29) E/flutter (21679): #4 _GetItImplementation.call (package:get_it/get_it_impl.dart:430:12) E/flutter (21679): #5 initializeDependencies (package:tutorial/src/injector.dart:31:39) E/flutter (21679): #6 main (package:tutorial/main.dart:13:9) E/flutter (21679): #7 _runMainZoned.. (dart:ui/hooks.dart:130:25) E/flutter (21679): #8 _rootRun (dart:async/zone.dart:1426:13) E/flutter (21679): #9 _CustomZone.run (dart:async/zone.dart:1328:19) E/flutter (21679): #10 _runZoned (dart:async/zone.dart:1861:10) E/flutter (21679): #11 runZonedGuarded (dart:async/zone.dart:1849:12) E/flutter (21679): #12 _runMainZoned. (dart:ui/hooks.dart:126:5) E/flutter (21679): #13 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:297:19) E/flutter (21679): #14 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12) E/flutter (21679):
I injected dependencies to get_it here: https://github.com/plibr/tutorial/blob/master/lib/src/injector.dart
I don`t get any error or warning before run, but it says my TutorialsApiService is not registered to project.
Anyone can direct me to correct way?
Thanks!
The text was updated successfully, but these errors were encountered:
same problem
Sorry, something went wrong.
@rsulab have you solved this?
@escamoteur what do you think about this problem?
I found the mistake, there is another forward slash in this line:
import 'package:tutorial/src/data/datasources/remote//tutorials/tutorials_api_service.dart'; after 'remote'
No branches or pull requests
here is my minimal repo: https://github.com/plibr/tutorial
I am receiving this error when I run:
E/flutter (21679): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: 'package:get_it/get_it_impl.dart': Failed assertion: line 372 pos 7: 'instanceFactory != null': Object/factory with type TutorialsApiService is not registered inside GetIt.
E/flutter (21679): (Did you accidentally do GetIt sl=GetIt.instance(); instead of GetIt sl=GetIt.instance;
E/flutter (21679): Did you forget to register it?)
E/flutter (21679): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter (21679): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
E/flutter (21679): #2 _GetItImplementation._findFactoryByNameAndType (package:get_it/get_it_impl.dart:372:7)
E/flutter (21679): #3 _GetItImplementation.get (package:get_it/get_it_impl.dart:393:29)
E/flutter (21679): #4 _GetItImplementation.call (package:get_it/get_it_impl.dart:430:12)
E/flutter (21679): #5 initializeDependencies (package:tutorial/src/injector.dart:31:39)
E/flutter (21679): #6 main (package:tutorial/main.dart:13:9)
E/flutter (21679): #7 _runMainZoned.. (dart:ui/hooks.dart:130:25)
E/flutter (21679): #8 _rootRun (dart:async/zone.dart:1426:13)
E/flutter (21679): #9 _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter (21679): #10 _runZoned (dart:async/zone.dart:1861:10)
E/flutter (21679): #11 runZonedGuarded (dart:async/zone.dart:1849:12)
E/flutter (21679): #12 _runMainZoned. (dart:ui/hooks.dart:126:5)
E/flutter (21679): #13 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:297:19)
E/flutter (21679): #14 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
E/flutter (21679):
I injected dependencies to get_it here: https://github.com/plibr/tutorial/blob/master/lib/src/injector.dart
I don`t get any error or warning before run, but it says my TutorialsApiService is not registered to project.
Anyone can direct me to correct way?
Thanks!
The text was updated successfully, but these errors were encountered: