rotateAroundPoint abstract method

MoveAndRotateResult rotateAroundPoint(
  1. double degree, {
  2. Point<double>? point,
  3. Offset? offset,
  4. String? id,
})

Rotates the map to a decimal degree around a custom screen point, where 0° is North

See rotate to rotate the map around the current map center.

One, and only one, of point or offset must be defined:

  • point: allows rotation around a screen-based point (in normal logical pixels), where Offset(0,0) is the top-left of the map widget, and the bottom right is Offset(mapWidth, mapHeight).
  • offset: allows rotation around a screen-based offset (in normal logical pixels) from the map's center. For example, Offset(100, 100) will mean the point is the 100px down & 100px right from the center.

May cause glitchy movement if rotated against the map's bounds.

id is an internally meaningless attribute, but it is passed through to the emitted MapEventRotate and MapEventMove.

The emitted MapEventRotate.source/MapEventMove.source properties will be MapEventSource.mapController.

The operation was successful if both fields of the resulting record are true.

Implementation

MoveAndRotateResult rotateAroundPoint(
  double degree, {
  Point<double>? point,
  Offset? offset,
  String? id,
});