ScerIO / packages.flutter

👨‍💻 Plugins and packages for Flutter framework
https://pub.dev/publishers/serge.software/packages
MIT License
458 stars 451 forks source link

Getting `Error: Type 'DecoderCallback' not found.` Error when upgrade flutter to 3.16.0 #461

Open Munsif-Ali opened 11 months ago

Munsif-Ali commented 11 months ago

After upgrading flutter to 3.16.0. the pdfx package is giving this error after running the project

/C:/Users/Dubai%20Laptops/AppData/Local/Pub/Cache/hosted/pub.dev/pdfx-2.5.0/lib/src/viewer/pdf_page_image_provider.dart:24:55: Error: Type 
'DecoderCallback' not found.
  ImageStreamCompleter load(PdfPageImageProvider key, DecoderCallback decode) =>
                                                      ^^^^^^^^^^^^^^^
/C:/Users/Dubai%20Laptops/AppData/Local/Pub/Cache/hosted/pub.dev/pdfx-2.5.0/lib/src/viewer/pdf_page_image_provider.dart:24:55: Error: 'DecoderCallback' isn't a type.
  ImageStreamCompleter load(PdfPageImageProvider key, DecoderCallback decode) =>
                                                      ^^^^^^^^^^^^^^^
/C:/Users/Dubai%20Laptops/AppData/Local/Pub/Cache/hosted/pub.dev/pdfx-2.5.0/lib/src/viewer/pdf_page_image_provider.dart:70:14: Error: 'ImmutableBuffer' isn't a type.
    final ui.ImmutableBuffer buffer =
             ^^^^^^^^^^^^^^^
/C:/Users/Dubai%20Laptops/AppData/Local/Pub/Cache/hosted/pub.dev/pdfx-2.5.0/lib/src/viewer/pdf_page_image_provider.dart:71:18: Error: Undefined name 'ImmutableBuffer'.
        await ui.ImmutableBuffer.fromUint8List(bytes);

To Reproduce Steps to reproduce the behavior:

  1. upgrade flutter to latest version i.e 3.16.0
  2. i am using 2.4.0 version of pdfx
  3. when running flutter project it is giving me the above error.
  4. after updating the pdfx version to 2.5.0 still getting the same error

Smartphone (please complete the following information):

TomKrauss commented 11 months ago

Duplicate of : https://github.com/ScerIO/packages.flutter/issues/448

ManuelRauber commented 8 months ago

Please check the new version on PubDev, it has been updated to 2.6.0 and includes the fix for the DecoderCallback issue.