setCamera abstract method

void setCamera(
  1. MapViewCamera camera, {
  2. Duration? duration,
})

Puts the camera at camera: its centre, and also which way it faces and how far it leans.

With a duration the camera travels there over that time; called once a second with a one-second duration it follows a moving position without a jump between fixes. With none it uses the provider's own animation, and with Duration.zero it is there at once.

Attribution applies as it does to fitBounds, so a host that follows a position can tell its own steps from the user taking the map over.

Implementation

void setCamera(MapViewCamera camera, {Duration? duration});