flutter_animarker 0.1.2 copy "flutter_animarker: ^0.1.2" to clipboard
flutter_animarker: ^0.1.2 copied to clipboard

outdated

Solution to move a Marker smoothly throught Google Maps in Flutter.

example/example.md

Google Maps Markers Animation #

Sometime you need more than place a marker in the maps, you required a smoothly throught Google Maps canvas.

Here the main uses of this package to animate the markers changes of position.

Example #

LatLngInterpolationStream _latLngStream = LatLngInterpolationStream();
StreamSubscription<LatLngDelta> subscription;

@override
void initState() {
	subscription= _latLngStream .getLatLngInterpolation().listen((LatLngDelta delta) {
  LatLng from = delta.from;
  LatLng to = delta.to;
});

super.initState();
}

void updatePinOnMap() {
  var pinPosition = LatLng(currentLocation.latitude, currentLocation.longitude);

  _latLngStream.addLatLng(pinPosition);
}

@override
void dispose() {
  subscription.cancel();
  _latLngStream.cancel();
 super.dispose();
}
163
likes
30
points
32.8k
downloads

Publisher

verified publishergaurisjavier.com

Weekly Downloads

Solution to move a Marker smoothly throught Google Maps in Flutter.

License

BSD-3-Clause (license)

Dependencies

flutter, google_maps_flutter

More

Packages that depend on flutter_animarker