getPixelInterpolate method Null safety

int getPixelInterpolate(
  1. num fx,
  2. num fy,
  3. [Interpolation interpolation = Interpolation.linear]
)

Get the pixel using the given interpolation type for non-integer pixel coordinates.

Implementation

int getPixelInterpolate(num fx, num fy,
    [Interpolation interpolation = Interpolation.linear]) {
  if (interpolation == Interpolation.cubic) {
    return getPixelCubic(fx, fy);
  } else if (interpolation == Interpolation.linear) {
    return getPixelLinear(fx, fy);
  }
  return getPixelSafe(fx.toInt(), fy.toInt());
}