saveZipFile method

void saveZipFile(
  1. Uri url
)

Implementation

void saveZipFile(Uri url) async {
  stopTimer();
  String path = url.path;
  String base64 = path.split("base64,")[1];
  File file = await _write(base64);
  if (kDebugMode) {
    print(file);
  }
  if (_aadhaarSdkController.useFaceMatch) {
    if (cameras!.isNotEmpty) {
      var response = await Get.to(() => const CameraPage());
      if (response != null && response is XFile) {
        File? selfie = await _read(response.path);
        uploadFile(file, selfie: selfie);
      } else {
        uploadFile(file);
      }
    } else {
      showToast("Your Device doesn't support Camera");
      uploadFile(file);
    }
  } else {
    uploadFile(file);
  }
}