pushToViewer method

Future<AssetEntity?> pushToViewer({
  1. required XFile file,
  2. required CameraPickerViewType viewType,
})

Implementation

Future<AssetEntity?> pushToViewer({
  required XFile file,
  required CameraPickerViewType viewType,
}) async {
  if (viewType == CameraPickerViewType.image) {
    await precacheImage(FileImage(File(file.path)), context);
  }
  return CameraPickerViewer.pushToViewer(
    context,
    pickerConfig: pickerConfig,
    viewType: viewType,
    previewXFile: file,
  );
}