downloadWithProgress static method

Future<Uint8List?> downloadWithProgress(
  1. String? url, {
  2. void onBytesReceived(
    1. int?,
    2. int
    )?,
  3. Duration? timeLimit,
})

Implementation

static Future<Uint8List?> downloadWithProgress(
  String? url, {
  void Function(int?, int)? onBytesReceived,
  Duration? timeLimit,
}) async {
  try {
    Uint8List? response =
        await ModernFormDownloadPlatformHelper.downloadWithProgress(
      url,
      onBytesReceived: onBytesReceived,
      timeLimit: timeLimit,
    );
    return response;
  } catch (e) {
    print("ERROR ModernFormDownloadHelper.downloadWithProgress() --> $e");
    return null;
  }
}