Closed hallelk closed 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.
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.
Yes, but in the code, event return from Stream.map() which is never null.
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.
This issue was closed because it has been stalled for 7 days with no activity.
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.