Null check operator used on a null value Stacked_Locator for test
I'm getting the same issue as https://github.com/FilledStacks/stacked/issues/367, but not in main app it's working fine on app side. Getting this issue on test side, while I'm trying to replicate TDD article.
Stacked version:
stacked: ^2.1.5
stacked_services: ^0.8.6
stacked_hooks: ^0.2.0
stacked_generator: ^0.4.6
Null check operator used on a null value
StackedLocator._canRegister
package:stacked/…/code_generation/stacked_locator.dart:45
StackedLocator.registerSingleton
package:stacked/…/code_generation/stacked_locator.dart:211
getAndRegisterNavigationService
test\helpers\test_helpers.dart:16
registerServices
test\helpers\test_helpers.dart:28
I'm also getting Target of URI doesn't exist: 'package:logger/logger.dart'. error on generated logger class don't know if these two issues are related.
Flutter doctor report:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.0.6, on Microsoft Windows [Version 10.0.19042.662], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Android Studio
[√] VS Code (version 1.56.2)
[√] Connected device (2 available)
• No issues found!
can you check on the latest version of the stacked 2.1.6 please
Thanks @hurbes the latest version solve this weird error, however I'm still getting this error
Target of URI doesn't exist:
'package:logger/logger.dart'.
error on generated logger class.
add logger: ^1.0.0 to your dependencies if you want to use logger
Thanks @hurbes it fixed the issue. I'm closing this issue.