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

Type 'DecoderCallback' not found In flutter 3.16 #448

Closed
jahnli opened this issue Nov 16, 2023 · 19 comments
Closed

Type 'DecoderCallback' not found In flutter 3.16 #448

jahnli opened this issue Nov 16, 2023 · 19 comments
Assignees
Labels
bug Something isn't working

Comments

@jahnli
Copy link

jahnli commented Nov 16, 2023

Describe the bug

/E:/pub-cache/hosted/pub.flutter-io.cn/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) =>
@jahnli jahnli added the bug Something isn't working label Nov 16, 2023
@erlangparasu
Copy link

erlangparasu commented Nov 16, 2023

Got same issue

../../../.pub-cache/hosted/pub.dev/pdfx-2.5.0/lib/src/viewer/pdf_page_image_provider.dart:24:55: Error:
Type 'DecoderCallback' not found.
[  +17 ms] [   +2 ms]   ImageStreamCompleter load(PdfPageImageProvider key, DecoderCallback decode) =>
[        ] [        ]                                                       ^^^^^^^^^^^^^^^
[        ] [        ]
../../../.pub-cache/hosted/pub.dev/pdfx-2.5.0/lib/src/viewer/pdf_page_image_provider.dart:40:7: Error:
Type 'DecoderCallback' not found.
[        ] [        ]       DecoderCallback decode) async {
[        ] [        ]       ^^^^^^^^^^^^^^^
[        ] [        ]

@JgomesAT
Copy link

We can compile flutter by fault of this any solution?

@jahnli
Copy link
Author

jahnli commented Nov 16, 2023

This is my solution, I am not sure if it is suitable, but I was able to compile successfully

#449

@erlangparasu
Copy link

Thanks @jahnli

This is my current temporary solution using @jahnli PR :
File: pubspec.yaml

  # pdfx: ^2.5.0
  pdfx:
    git:
      url: 'https://github.com/ScerIO/packages.flutter'
      ref: '4be9de9ffed5398fd7d5f44bbb07dcd3d3f1711b'
      path: packages/pdfx

@jahnli
Copy link
Author

jahnli commented Nov 16, 2023

谢谢@jahnli

这是我当前使用的临时解决方案@jahnliPR: 文件:pubspec.yaml

  # pdfx: ^2.5.0
  pdfx:
    git:
      url: 'https://github.com/ScerIO/packages.flutter'
      ref: '4be9de9ffed5398fd7d5f44bbb07dcd3d3f1711b'
      path: packages/pdfx

Yes, you can introduce PR as a temporary solution and wait for the author to fix it

@JgomesAT
Copy link

With this solution I can't see the image of PDF, I can compile but isn't work

PdfView(

@jahnli
Copy link
Author

jahnli commented Nov 16, 2023

With this solution I can't see the image of PDF, I can compile but isn't work

PdfView(

I can show it fine in the official example, I'm not sure if I need extra processing

@ElDuderini
Copy link

Coworker faced the same issue, so we decided to revert to the prior flutter version for the time being because of it.

@JgomesAT
Copy link

JgomesAT commented Nov 16, 2023

With this solution I can't see the image of PDF, I can compile but isn't work

PdfView(

May be the problem is Impeller true in Android

@JgomesAT
Copy link

With Impeller active in ANdroid the PDF view is empty, in iOS is OK

@jahnli
Copy link
Author

jahnli commented Nov 17, 2023

8b105a7

@jahnli jahnli closed this as completed Nov 17, 2023
@RexIron
Copy link

RexIron commented Nov 17, 2023

8b105a7

Thank, it work fine, When do you think a new version might be available with this fix on Pub.dev? ?

@EmreDET
Copy link

EmreDET commented Nov 20, 2023

8b105a7

Thank, it work fine, When do you think a new version might be available with this fix on Pub.dev? ?

@SergeShkurko

@Yoda-Man
Copy link

when is the official fix coming

@GoodjoeDev
Copy link

8b105a7

Idk if it depends on the flutter version you are using but your solution doesn't work for me. You've replaced 'DecoderCallback' with 'ImageDecodeCallback' which results in a type conflict. STRG+F for 'DecoderCallback' on https://docs.flutter.dev/release/breaking-changes/3-13-deprecations to find the official replacement is 'DecoderBufferCallback'.

I've adjusted your fix and it worked fine for me 👍 I hope I helped someone and any insight on why that is, is appreciated

@jcho0216
Copy link

jcho0216 commented Dec 18, 2023

bro gotta drop the new version with the fix

LucazzP added a commit to LucazzP/packages.flutter that referenced this issue Dec 19, 2023
fix: issue ScerIO#448 Deprecated members on PdfImageProvider and pdfx_test …
dxvid-pts added a commit to dxvid-pts/packages.flutter that referenced this issue Dec 26, 2023
fix: issue ScerIO#448 Deprecated members on PdfImageProvider and pdfx_test …
@nilsreichardt
Copy link

@SergeShkurko Could you publish a new version on pub.dev?

@Coder-Manuel
Copy link

Any news on release date for the fix ?
@SergeShkurko

@antiv
Copy link

antiv commented Jan 23, 2024

@jahnli

8b105a7

Could you please share any information about the availability of the fix on pub.dev?

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

Successfully merging a pull request may close this issue.