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 81 forks source link

freezed wrong heading on device without compass sensor #40

Closed hallelk closed 1 year ago

hallelk commented 1 year ago

when using a device without compass sensor (eg. Xiaomi redmi 9a), the heading appears but it's naturally wrong and stuck. i wasn't able to debug it yet but i would guess it has to do with data_stream_factory.dart(38) return (stream ?? (!kIsWeb ? FlutterCompass.events! : const Stream.empty())) (maybe FlutterCompass.events is null).

i would say the expected behavior would be not to show the heading in this case.

tlserver commented 1 year ago

I think FlutterCompass.events is never null. Can you help to test if FlutterCompass.events is null on Xiaomi redmi 9a? I do not have that phone.

hallelk commented 1 year ago

I don't have this phone either. got this feedback from a client. i will try to find a way to reproduce. but meanwhile, i got this from pub.dev - Note: Android Only: null is returned as direction on android when no sensor available.

tlserver commented 1 year ago

Yes, but in the code, event return from Stream.map() which is never null.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 7 days with no activity.