resizeImage function

  1. @visibleForTesting
Image resizeImage(
  1. Image image,
  2. AndroidNotificationIconType type
)

Implementation

@visibleForTesting
Image resizeImage(Image image, AndroidNotificationIconType type) {
  if (image.width >= type.size) {
    return copyResize(
      image,
      width: type.size,
      height: type.size,
      interpolation: Interpolation.average,
    );
  } else {
    return copyResize(
      image,
      width: image.width,
      height: image.height,
      interpolation: Interpolation.linear,
    );
  }
}