Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Munsif-Ali opened this issue Nov 23, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Munsif-Ali
Copy link

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):

  • OS: Ubuntu 22.04
@Munsif-Ali Munsif-Ali added the bug Something isn't working label Nov 23, 2023
@TomKrauss
Copy link

Duplicate of : #448

@ManuelRauber
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants