isFileDownloaded static method

Future<String?> isFileDownloaded(
  1. String fileName
)

Implementation

static Future<String?> isFileDownloaded(String fileName) async {
  if (fileDownloadPath.isEmpty) {
    await setDownloadFilePath();
  }

  String filePath = "$fileDownloadPath/$fileName";

  if (File(filePath).existsSync() == true) {
    return filePath;
  } else {
    return null;
  }
}