How to get Compass Direction using sensor_plus in flutter?

Viewed 787

I want to get compass direction in my app. I am using flutter_compass to access compass direction. But flutter_compass is a bit slow means when I rotate my device it does not accurately give the direction of compass. That's why I want to use sensors_plus. Because It has more popularity. But sensors_plus give us position x,position y and z. I don't know how to use these positions to get compass direction.

If anyone know how to get compass direction using sensors_plus then answer this question

2 Answers

I was also facing this issue. It turns out it's a problem with the flutter_compass plugin in the latest version. Use this package version instead of the original; it overrides stuff from the original package to fix the issues:

flutter_compass:
    git: https://github.com/hemanthrajv/flutter_compass.git

stop and re-run the app for the fix to happen.

I was also facing this issue. So I recommend to use this package it is relatively new but give it a try it will resolve all of your issues

https://pub.dev/packages/smooth_compass use this package its relatively new but has almost no bugs and its super smooth no frame drop .

Related