copyResized method

Icon copyResized(
  1. int iconSize
)

Create a resized copy of this Icon

Implementation

Icon copyResized(int iconSize) {
  // Note: Do not change interpolation unless you end up with better results
  // (see issue for result when using cubic interpolation)
  if (image.width >= iconSize) {
    return Icon._(copyResize(
      image,
      width: iconSize,
      height: iconSize,
      interpolation: Interpolation.average,
    ));
  } else {
    return Icon._(copyResize(
      image,
      width: iconSize,
      height: iconSize,
      interpolation: Interpolation.linear,
    ));
  }
}