removeTextureAtlas method

void removeTextureAtlas(
  1. String name, {
  2. bool dispose = true,
})

Implementation

void removeTextureAtlas(String name, {bool dispose = true}) {
  final resourceManagerResource = _removeResource('TextureAtlas', name);
  final textureAtlas = resourceManagerResource?.value;
  if (textureAtlas is TextureAtlas && dispose) {
    for (var textureAtlasFrame in textureAtlas.frames) {
      textureAtlasFrame.bitmapData.renderTexture.dispose();
    }
  }
}