dispose method

void dispose()

Releases the image handle fromAsset gave this sheet. Sprites taken from the sheet share that image: dispose the sheet once they are gone. A sheet built on an image passed in leaves it alone.

Implementation

void dispose() {
  if (!_ownsImage) return;
  _ownsImage = false;
  image.dispose();
}