ko2ic / image_downloader

Flutter plugin that downloads images and movies on the Internet and saves to Photo Library on iOS or specified directory on Android.
https://pub.dartlang.org/packages/image_downloader#-readme-tab-
MIT License
92 stars 119 forks source link

onProgressUpdate is not working correctly on IOS #115

Open bilalozcan opened 2 years ago

bilalozcan commented 2 years ago

I use image downloader callback to track progress as following:

  void downloadImgProgress() {
    ImageDownloader.callback(onProgressUpdate: (String? imageId, int progress) {
      imgProgress = progress;
      print(progress);
    });

    if (imgProgress == 100) {
      CustomSnackBar.show(context, 'common.messages.image_downloaded');
    }
  }

I call the downloadImgProgress in initState:

  @override
  void initState() {
    super.initState();
    downloadImgProgress();
  }

But progress is changing as following log:

[quic] quic_packet_parser_inner [C4.1.1:2] [-0136971ecbc42bc5ba374f1e9bc4023981a22cbb] SH fixed bit is zero
[quic] quic_packet_parser_inner [C6.1.1:2] [-0184c5b2043476f7308482b1773474700bc6786d] SH fixed bit is zero
flutter: -633400
flutter: -1041300
flutter: -1096200
flutter: -1800600
flutter: -2152800
flutter: -3383400
flutter: -3438400
flutter: -3555200
flutter: -3907400
flutter: -4963700
flutter: -5667600
flutter: -8074600
flutter: -8308600
flutter: -8778200
flutter: -9189800
[Runner] findWriterForTypeAndAlternateType:119: unsupported file format 'public.heic'