tlserver / flutter_map_location_marker

A flutter map plugin for displaying device current location.
https://pub.dev/packages/flutter_map_location_marker
BSD 3-Clause "New" or "Revised" License
97 stars 82 forks source link

Fix: Null check operator on nullable heading value #74

Closed LeonTenorio closed 1 year ago

LeonTenorio commented 1 year ago

Just a fix on a error using the heading value and a null check operator

tlserver commented 1 year ago

Why do you need this? The onError below should handle the null value. And this PR is changing the current behavior, null value cause that it set _currentHeading to null originally but now just ignoring null value.

LeonTenorio commented 1 year ago

There is something weird, because I have an application that uses that and there is an error because a null check operator on a null value exactly in that line in heading!. I agree that I changed the behaviour so I will do some changes to adjust that, but for now that point that I have indicated is a problematic one. I found an explanation about the onError callback that you put and why the error is not executing that, the point is the onError only catches a stream exception, not a exception of the function that is processing a stream value https://stackoverflow.com/questions/69442085/exception-thrown-in-stream-callback-is-not-being-passed-to-onerror-callback

LeonTenorio commented 1 year ago

@tlserver I did those changes and now the problem is fixed and the behaviour is the same as the original. Now you can evaluate that.