DragMarker class

The data class has all information that is required for the DragMarkerWidget

Constructors

DragMarker({required LatLng point, Key? key, required DragMarkerWidgetBuilder builder, required Size size, Offset offset = const Offset(0, 0), Offset? dragOffset, bool useLongPress = false, void onDragStart(DragStartDetails details, LatLng latLng)?, void onDragUpdate(DragUpdateDetails details, LatLng latLng)?, void onDragEnd(DragEndDetails details, LatLng latLng)?, void onLongDragStart(LongPressStartDetails details, LatLng latLng)?, void onLongDragUpdate(LongPressMoveUpdateDetails details, LatLng latLng)?, void onLongDragEnd(LongPressEndDetails details, LatLng latLng)?, void onTap(LatLng latLng)?, void onLongPress(LatLng latLng)?, bool scrollMapNearEdge = false, double scrollNearEdgeRatio = 1.5, double scrollNearEdgeSpeed = 1.0, bool rotateMarker = true, Alignment? alignment})

Properties

alignment Alignment?
Alignment of the marker relative to the normal center at point
final
builder DragMarkerWidgetBuilder
The widget of the marker
final
dragOffset Offset?
the offset while the marker gets dragged around
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
A unique key for the marker
final
offset Offset
The position offset of the marker
final
onDragEnd → (void Function(DragEndDetails details, LatLng latLng)?)
This callback gets called when the DragMarker stopps to get dragged
final
onDragStart → (void Function(DragStartDetails details, LatLng latLng)?)
This callback gets called when the DragMarker starts to get dragged
final
onDragUpdate → (void Function(DragUpdateDetails details, LatLng latLng)?)
This callback gets called when the DragMarker gets dragged around
final
onLongDragEnd → (void Function(LongPressEndDetails details, LatLng latLng)?)
This callback gets called when the DragMarker stopps to get dragged with the useLongPress option enabled
final
onLongDragStart → (void Function(LongPressStartDetails details, LatLng latLng)?)
This callback gets called when the DragMarker starts to get dragged with the useLongPress option enabled
final
onLongDragUpdate → (void Function(LongPressMoveUpdateDetails details, LatLng latLng)?)
This callback gets called when the DragMarker gets dragged with the useLongPress option enabled
final
onLongPress → (void Function(LatLng latLng)?)
This callback gets called when the DragMarkerWiidget gets long pressed
final
onTap → (void Function(LatLng latLng)?)
This callback gets called when the DragMarkerWidget gets tapped
final
point ↔ LatLng
The initial coordinates of the marker
getter/setter pair
rotateMarker bool
This option keeps the marker upwards when rotating the map
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollMapNearEdge bool
EXPERIMENTAL, When this flag is enabled the map scrolls around when dragging a marker near an edge
final
scrollNearEdgeRatio double
This flag sets the sensitivity of when the map should starts to scroll. Requires scrollMapNearEdge to be set to true.
final
scrollNearEdgeSpeed double
This flag sets the scroll speed of the map map when a marker get near to an edge. Requires scrollMapNearEdge to be set to true.
final
size Size
The height and width of the marker widget
final
useLongPress bool
This flag requires a long press on the marker before it can get moved
final

Methods

inMapBounds({required MapCamera mapCamera, required Alignment markerWidgetAlignment}) bool
This method checks if the marker is in the current map bounds
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