We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using Geolocator with null safety and mockito you receive an analyzer error due to the incorrect definition of the == operator in Position.
error • 'Object.==' ('bool Function(Object)') isn't a valid concrete implementation of 'Position.==' ('bool Function(dynamic)') test/unit-tests/geolocation/geolocation_service_test.mocks.dart:16:7 • invalid_implementation_override
See - https://api.dart.dev/stable/2.12.2/dart-core/Object/operator_equals.html which shows the operator should receive an Object not dynamic.
Object
dynamic
By updating the definition it will remove unnecessary warnings from analyzer tools when mocking geolocator.
i.e.
bool operator ==(dynamic o) {
Needs to become
bool operator ==(Object o) {
The text was updated successfully, but these errors were encountered:
This issue is resolved with PR #710 and released as version 7.0.2 of the Geolocator. Thank you for reporting the issue and providing a fix!
Sorry, something went wrong.
No branches or pull requests
🏗 Enhancement Proposal
When using Geolocator with null safety and mockito you receive an analyzer error due to the incorrect definition of the == operator in Position.
See - https://api.dart.dev/stable/2.12.2/dart-core/Object/operator_equals.html which shows the operator should receive an
Object
notdynamic
.Pitch
By updating the definition it will remove unnecessary warnings from analyzer tools when mocking geolocator.
i.e.
Needs to become
Platforms affected (mark all that apply)
The text was updated successfully, but these errors were encountered: