downloadFile function

Future<void> downloadFile(
  1. String url
)

Implementation

Future<void> downloadFile(String url) async {
  try {
    print("Download or Share File: $url");
    final filePath = await download(url);
    await OpenFilex.open(filePath);
  } catch (e) {
    throw Exception('Error fetching file: $e');
  }
}