buildPreview method

Widget buildPreview()

Returns a widget showing a live camera preview.

Implementation

Widget buildPreview() {
  _throwIfNotInitialized("buildPreview");
  try {
    return CameraPlatform.instance.buildPreview(_cameraId);
  } on PlatformException catch (e) {
    throw CameraException(e.code, e.message);
  }
}