preview static method

Future<void> preview(
  1. File model
)

Presents a local 3D model. Completes once the viewer is presented.

Implementation

static Future<void> preview(File model) async {
  if (!Platform.isIOS) throw UnsupportedError('3D preview requires iOS.');
  if (!await model.exists()) {
    throw FileSystemException(
      'The 3D model file does not exist.',
      model.path,
    );
  }
  if (await model.length() == 0) {
    throw FileSystemException('The 3D model file is empty.', model.path);
  }
  await _channel.invokeMethod<void>('previewModel', {'path': model.path});
}