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, bool cancelPreviousAnimations = false})
-
Creates a
MapControllerthat provides animated methods.
Properties
- cancelPreviousAnimations → bool
-
Global option to define if previous animations should be canceled when a
new one is triggered.
final
- 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, Duration? duration, bool? cancelPreviousAnimations}) → Future< void> -
Will use the
cameraFitto calculate the center and zoom level and then animate to that position. -
animatedRotateFrom(
double degree, {Curve? curve, String? customId, Duration? duration, bool? cancelPreviousAnimations}) → Future< void> -
Apply a rotation of
degreeto the current rotation. -
animatedRotateReset(
{Curve? curve, String? customId, Duration? duration, bool? cancelPreviousAnimations}) → Future< void> - Reset the rotation to 0.
-
animatedRotateTo(
double degree, {Curve? curve, String? customId, Duration? duration, bool? cancelPreviousAnimations}) → Future< void> -
Set the rotation to
degree. -
animatedZoomIn(
{Curve? curve, String? customId, Duration? duration, bool? cancelPreviousAnimations}) → Future< void> - Add one level to the current zoom level.
-
animatedZoomOut(
{Curve? curve, String? customId, Duration? duration, bool? cancelPreviousAnimations}) → Future< void> - Remove one level to the current zoom level.
-
animatedZoomTo(
double newZoom, {Curve? curve, String? customId, Duration? duration, bool? cancelPreviousAnimations}) → Future< void> -
Set the zoom level to
newZoom. -
animateTo(
{LatLng? dest, double? zoom, Offset offset = Offset.zero, double? rotation, Curve? curve, String? customId, Duration? duration, bool? cancelPreviousAnimations}) → Future< void> -
Animate the map to
destwith an optionalzoomlevel androtationin degrees. -
centerOnPoint(
LatLng point, {double? zoom, Curve? curve, String? customId, Duration? duration, bool? cancelPreviousAnimations}) → Future< void> -
Center the map on
pointwith an optionalzoomlevel. -
centerOnPoints(
List< LatLng> points, {Curve? curve, String? customId}) → Future<void> -
Will use the
LatLngBounds.fromPointsmethod to calculate the bounds of thepointsand 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
-
stopAnimations(
) → void - Stop all ongoing animations.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited