Offset.from constructor

Offset.from(
  1. (int, int) pair
)

Creates a new offset from a coordinate pair (x, y).

Implementation

factory Offset.from((int x, int y) pair) {
  final (x, y) = pair;
  return Offset(x, y);
}