Flutterlocation: Get heading/direction

Created on 2 Feb 2019  路  3Comments  路  Source: Lyokone/flutterlocation

Would it be possible to add a "heading", or "direction", key to the supplied location object, that tells the direction that the device is currently rotated in. This is very useful when building an app that shows a compass to navigate the user to a specific place.

This value can be read on iOS using the trueHeading (or, failing that, the magneticHeading) from the CLHeading object.

On Android this can be read using the SensorManager.getOrientation function.

Look at this project for some actual code: https://github.com/hemanthrajv/flutter_compass

Cheers 馃嵒

Most helpful comment

Hey ! I will probably have a look into it over the weekend :)

All 3 comments

Hey ! I will probably have a look into it over the weekend :)

Has been added in version 2.1 :)

Awesome, thanks!

Was this page helpful?
0 / 5 - 0 ratings