centerOnScreenOffset method

void centerOnScreenOffset(
  1. Offset ssOffset, {
  2. Duration? duration,
  3. bool animate = true,
})

Center the canvas so that the given screen-space offset is at the center of the viewport.

Implementation

void centerOnScreenOffset(Offset ssOffset, {Duration? duration, bool animate = true}) {
  centerOnGridOffset(ssToGs(ssOffset, _gsTopLeftOffset, _scale), animate: animate);
}