isCloneOf method Null safety

bool isCloneOf(
  1. Image other
)

Returns true if other is a clone of this and thus shares the same underlying image memory, even if this or other is disposed.

This method may return false for two images that were decoded from the same underlying asset, if they are not sharing the same memory. For example, if the same file is decoded using instantiateImageCodec twice, or the same bytes are decoded using decodeImageFromPixels twice, there will be two distinct Images that render the same but do not share underlying memory, and so will not be treated as clones of each other.

Implementation

bool isCloneOf(Image other) => other._image == _image;