getVideo method

Future<void> getVideo(
  1. String type
)

Picks a video and compresses it if necessary.

Implementation

Future<void> getVideo(String type) async {
  FilePickerResult? result =
      await FilePicker.platform.pickFiles(type: FileType.video);
  if (result != null) {
    getVideoCompressed(XFile(result.files.single.path ?? ""), type);
  } else {
    callback.error('No Video Selected');
  }
}