MapMoveAttribution mixin

Remembers camera updates the app asked for, so the widget layer can tell them apart from user gestures.

Google Maps and the Mapbox SDK report that the camera moved and nothing about why, so the only way to attribute a move is to remember having asked for it. Controllers mix this in and call beginProgrammaticMove before issuing a camera update; the widget reads moveSource as each camera event arrives and calls onCameraSettled when the camera comes to rest.

flutter_map reports a source of its own (MapEventSource) and needs none of this.

Mixin applications

Properties

hashCode int
The hash code for this object.
no setterinherited
moveSource MapMoveSource
What to report for a camera event arriving now.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
settleWindow Duration
The window beginProgrammaticMove arms. Override to shorten it — a map whose camera calls are never animated settles far sooner than this.
no setter

Methods

beginProgrammaticMove() → void
Marks the camera events that the app's own camera update is about to produce, until the camera settles again.
disposeMoveAttribution() → void
Drops the pending settle timeout. Call it from the controller's dispose.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCameraSettled() → void
Records that the camera came to rest.
toString() String
A string representation of this object.
inherited

Operators

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

Constants

defaultSettleWindow → const Duration
How long a camera update is assumed to still be running when no settle ends it.