RenderTexture.fromCanvasElement(CanvasElement canvasElement)

Source

RenderTexture.fromCanvasElement(CanvasElement canvasElement) {
  _width = ensureInt(canvasElement.width);
  _height = ensureInt(canvasElement.height);
  _source = _canvas = canvasElement;
}