Flutter: map location.heading is always -1.0 in iOS

Viewed 27

I have a car marker that rotates every time the location changes.

    Marker marker = Marker(
      markerId: markerId,
      icon: descriptor,
      position: position,
      rotation: location.heading,
      anchor: Offset(0.5, 0.5),
    );

It works on my android devices and it's rotating but when I run my app on my iOS device and I use XCode's Simulate Location but it's not turning.

I tried to print location.heading but it prints -1.0 even if the position changes.

0 Answers
Related