buildPreview method

Widget buildPreview(
  1. int textureId
)

Builds the widget that renders the preview started with startPreview.

On the desktop and mobile implementations this is a zero-copy Texture fed by the native frame producer. The web implementation overrides this to return an HtmlElementView hosting the getUserMedia stream.

Implementation

Widget buildPreview(int textureId) {
  return Texture(textureId: textureId);
}