AnimatedMapController class

A wrap around MapController that provides animated methods.

Constructors

AnimatedMapController({required TickerProvider vsync, MapController? mapController, Duration duration = const Duration(milliseconds: 500), Curve curve = Curves.fastOutSlowIn})
Creates a MapController that provides animated methods.

Properties

curve Curve
The curve of the animation.
final
duration Duration
The duration of the animation.
final
hashCode int
The hash code for this object.
no setterinherited
mapController → MapController
Implementation of the map controller that will be used to trigger movements.
final
rotation double
Current rotation of the map.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
vsync TickerProvider
The vsync of the animation.
final

Methods

animatedFitCamera({required CameraFit cameraFit, Curve? curve, String? customId, double? rotation}) Future<void>
Will use the cameraFit to calculate the center and zoom level and then animate to that position.
animatedRotateFrom(double degree, {Curve? curve, String? customId}) Future<void>
Apply a rotation of degree to the current rotation.
animatedRotateReset({Curve? curve, String? customId}) Future<void>
Reset the rotation to 0.
animatedRotateTo(double degree, {Curve? curve, String? customId}) Future<void>
Set the rotation to degree.
animatedZoomIn({Curve? curve, String? customId}) Future<void>
Add one level to the current zoom level.
animatedZoomOut({Curve? curve, String? customId}) FutureOr<void>
Remove one level to the current zoom level.
animatedZoomTo(double newZoom, {Curve? curve, String? customId}) Future<void>
Set the zoom level to newZoom.
animateTo({LatLng? dest, double? zoom, Offset offset = Offset.zero, double? rotation, Curve? curve, String? customId}) Future<void>
Animate the map to dest with an optional zoom level and rotation in degrees.
centerOnPoint(LatLng point, {double? zoom, Curve? curve, String? customId}) Future<void>
Center the map on point with an optional zoom level.
centerOnPoints(List<LatLng> points, {Curve? curve, String? customId}) Future<void>
Will use the LatLngBounds.fromPoints method to calculate the bounds of the points and then use the animatedFitCamera method to animate to that position.
dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited