-
-
Notifications
You must be signed in to change notification settings - Fork 770
New issue
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
refactor: update deprecated and minor code refactors #710
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove const
because CacheConfig
isn’t a const constructor
Analyzing revanced-manager...
error - The constructor being called isn't a const constructor - lib\services\crowdin_api.dart:14:59 - const_with_non_const
error - The constructor being called isn't a const constructor - lib\services\github_api.dart:16:60 - const_with_non_const
error - The constructor being called isn't a const constructor - lib\services\revanced_api.dart:19:60 - const_with_non_const
The constructor being called isn’t a const constructor. - https://dart.dev/tools/diagnostic-messages#const_with_non_const
@evademaster please have a look now. |
Upon installing the application via LogI/flutter ( 8437): Error while creating ManagerAPI
I/flutter ( 8437): Stack trace:
I/flutter ( 8437): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
I/flutter ( 8437): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
I/flutter ( 8437): #2 _GetItImplementation._findFactoryByNameAndType (package:get_it/get_it_impl.dart:372:7)
I/flutter ( 8437): #3 _GetItImplementation.get (package:get_it/get_it_impl.dart:393:29)
I/flutter ( 8437): #4 _GetItImplementation.call (package:get_it/get_it_impl.dart:430:12)
I/flutter ( 8437): #5 StackedLocator.call (package:stacked_core/src/code_generation/locator/stacked_locator.dart:85:17)
I/flutter ( 8437): #6 new ManagerAPI (package:revanced_manager/services/manager_api.dart:21:43)
I/flutter ( 8437): #7 setupLocator.<anonymous closure> (package:revanced_manager/app/app.locator.dart:35:39)
I/flutter ( 8437): #8 _ServiceFactory.getObject (package:get_it/get_it_impl.dart:160:41)
I/flutter ( 8437): #9 _GetItImplementation.get (package:get_it/get_it_impl.dart:409:34)
I/flutter ( 8437): #10 _GetItImplementation.call (package:get_it/get_it_impl.dart:430:12)
I/flutter ( 8437): #11 StackedLocator.call (package:stacked_core/src/code_generation/locator/stacked_locator.dart:85:17)
E/flutter ( 8437): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:get_it/get_it_impl.dart': Failed assertion: line 372 pos 7: 'instanceFactory != null': Object/factory with type SharedPreferences is not registered inside GetIt.
E/flutter ( 8437): (Did you accidentally do GetIt sl=GetIt.instance(); instead of GetIt sl=GetIt.instance;
E/flutter ( 8437): Did you forget to register it?)
E/flutter ( 8437): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter ( 8437): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
E/flutter ( 8437): #2 _GetItImplementation._findFactoryByNameAndType (package:get_it/get_it_impl.dart:372:7)
E/flutter ( 8437): #3 _GetItImplementation.get (package:get_it/get_it_impl.dart:393:29)
E/flutter ( 8437): #4 _GetItImplementation.call (package:get_it/get_it_impl.dart:430:12)
E/flutter ( 8437): #5 StackedLocator.call (package:stacked_core/src/code_generation/locator/stacked_locator.dart:85:17)
E/flutter ( 8437): #6 new ManagerAPI (package:revanced_manager/services/manager_api.dart:21:43)
E/flutter ( 8437): #7 setupLocator.<anonymous closure> (package:revanced_manager/app/app.locator.dart:35:39)
E/flutter ( 8437): #8 _ServiceFactory.getObject (package:get_it/get_it_impl.dart:160:41)
E/flutter ( 8437): #9 _GetItImplementation.get (package:get_it/get_it_impl.dart:409:34)
E/flutter ( 8437): #10 _GetItImplementation.call (package:get_it/get_it_impl.dart:430:12)
E/flutter ( 8437): #11 StackedLocator.call (package:stacked_core/src/code_generation/locator/stacked_locator.dart:85:17)
E/flutter ( 8437): #12 main (package:revanced_manager/main.dart:20:26)
E/flutter ( 8437): <asynchronous suspension>
E/flutter ( 8437): ScreenshotTested on
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #710 (comment)
@evademaster you need to run the generation to generate the dependency injection for the flutter pub run build_runner build --delete-conflicting-outputs |
I.. I- yeah, kill me, aaaaaaaaaaaaaaaaI'm very, very sorry about that, yeah, I just reviewed your PR, LGTM 👍 |
Improve code readability & additional refactoring Commits: chore: exclude generated from analyzer refactor: add SharedPreferences to locator refactor: access shared pref from locator, and code refactor refactor: remove unwanted `await` refactor: remove `const` from `CacheConfig`
…ed#710)" This reverts commit 6829d3c. Signed-off-by: EvadeMaster <[email protected]>
…ed#710)" This reverts commit 6829d3c. Signed-off-by: EvadeMaster <[email protected]>
No description provided.