flutterlocation
flutterlocation copied to clipboard
LocationData latitude and longitude should not be nullable
Is your feature request related to a problem? Please describe. The definition of the class is nullable on every field, at least latitude and longitude should not be nullable:
https://github.com/Lyokone/flutterlocation/blob/master/packages/location_platform_interface/lib/src/types.dart#L46-L50
Or Is there any use case for a nullable latitude/longitude?
Describe the solution you'd like Make those fields not nullable
Describe workarounds you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context It is not safe to just declare every possible field as null everywhere
Can we know when these fields will be null?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@2shrestha22 to me that case should not exist, if a location exist then the lat,lng should exist too, looks like an issue migrating to nullable types or a bad class definition 🤓