move method
Moves and zooms the map to a center
and zoom
level
offset
allows a screen-based offset (in normal logical pixels) to be
applied to the center
from the map's view center. For example,
Offset(100, 100)
will move the intended new center
100px down & 100px
right, and the actual center will become 100px up & 100px left.
id
is an internally meaningless attribute, but it is passed through to
the emitted MapEventMove.
The emitted MapEventMove.source property will be MapEventSource.mapController.
Returns true
and emits a MapEventMove event (which can be listed to
through MapEventCallbacks, such as MapOptions.onMapEvent), unless
the move failed because (after adjustment when necessary):
center
andzoom
are equal to the current valuescenter
is out of bounds & MapOptions.slideOnBoundaries isn't enabled
Implementation
@override
bool move(
LatLng center,
double zoom, {
Offset offset = Offset.zero,
String? id,
}) =>
_state.move(
center,
zoom,
offset: offset,
id: id,
source: MapEventSource.mapController,
);