RenderTexture.fromImageElement(ImageElement imageElement)

Source

RenderTexture.fromImageElement(ImageElement imageElement) {
  _width = ensureInt(imageElement.width);
  _height = ensureInt(imageElement.height);
  _source = imageElement;
}