3

[ Flutter / Dart ] I need to create a map where dozens of cars will move and for each of them I need to rotate the icon in the direction of travel. Any ideas how to do this?

Example

Nort
  • 117
  • 9
  • 1
    You can use the `flutter_animarker` package that will allow you to rotate the marker that can be useful for Uber-like or delivery apps. You can check it here: https://pub.dev/packages/flutter_animarker – jabamataro Nov 22 '21 at 07:05
  • @jabamataro , unfortunately, this is not what I'm looking for – Nort Nov 29 '21 at 19:25

1 Answers1

2

try this

Marker(
    markerId: const MarkerId("MarkerIdHere"),
    rotation: location.heading,
    //anchor: const Offset(0.5, 0.5),
    position: LatLng(
        location.latitude, location.longitude),
  );
Bilal Almefleh
  • 277
  • 1
  • 10