From 1205263f590c45e413facd27f4c16fd125a6bad5 Mon Sep 17 00:00:00 2001 From: Harsh Date: Thu, 16 Dec 2021 21:56:57 +0530 Subject: [PATCH 1/2] Fixed Error: Type 'VoidCallback' not found. Error Due to missing import, fixed by importing. --- lib/src/utils/downloader_utils.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/utils/downloader_utils.dart b/lib/src/utils/downloader_utils.dart index ab57dd9..a64b04e 100644 --- a/lib/src/utils/downloader_utils.dart +++ b/lib/src/utils/downloader_utils.dart @@ -1,5 +1,5 @@ import 'dart:io'; - +import 'dart:ui'; import 'package:dio/dio.dart' hide ProgressCallback; import 'package:flowder/src/flowder.dart'; import 'package:flowder/src/progress/interfaces/progress_interface.dart'; From 1ddd171a763c4f1ba09b95e34e35e2e5cf0d1bba Mon Sep 17 00:00:00 2001 From: Harsh Date: Thu, 16 Dec 2021 21:58:19 +0530 Subject: [PATCH 2/2] Update Flowder.dart Fixed Error: 'VoidCallback' isn't a type. --- lib/src/flowder.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/flowder.dart b/lib/src/flowder.dart index 2615636..1eab705 100644 --- a/lib/src/flowder.dart +++ b/lib/src/flowder.dart @@ -14,7 +14,7 @@ export 'utils/utils.dart'; /// Global [typedef] that returns a `int` with the current byte on download /// and another `int` with the total of bytes of the file. typedef ProgressCallback = void Function(int count, int total); - +typedef VoidCallback = void Function(); /// Class used as a Static Handler /// you can call the folowwing functions. /// - Flowder.download: Returns an instance of [DownloaderCore]