void removeBitmapData(String name, { bool dispose: true })

Source

void removeBitmapData(String name, {bool dispose:true}) {
  var resourceManagerResource = _removeResource("BitmapData", name);
  var bitmapData = resourceManagerResource?.value;
  if (bitmapData is BitmapData && dispose) {
    bitmapData.renderTexture.dispose();
  }
}