copyWith method

Point copyWith({
  1. double? x,
  2. double? y,
})

Returns a copy with updated values.

Implementation

Point copyWith({double? x, double? y}) {
  return Point(x ?? this.x, y ?? this.y);
}