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 'ImageDecoderCallback' not found. #32

Closed
MargaretLHP opened this issue Jul 21, 2023 · 6 comments
Closed

Type 'ImageDecoderCallback' not found. #32

MargaretLHP opened this issue Jul 21, 2023 · 6 comments

Comments

@MargaretLHP
Copy link

1.0.10.
Running Gradle task 'assembleDebug'...
../../.pub-cache/hosted/pub.dev/crop_image-1.0.10/lib/src/crop_controller.dart:352:55: Error: Type 'ImageDecoderCallback' not found.
ImageStreamCompleter loadImage(UiImageProvider key, ImageDecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key));
^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/crop_image-1.0.10/lib/src/crop_controller.dart:352:55: Error: 'ImageDecoderCallback' isn't a type.
ImageStreamCompleter loadImage(UiImageProvider key, ImageDecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key));
^^^^^^^^^^^^^^^^^^^^

@deakjahn
Copy link
Owner

deakjahn commented Jul 21, 2023

I can't reproduce this, it finds it for me. Which Flutter version do you use?

@deakjahn deakjahn reopened this Jul 21, 2023
@MargaretLHP
Copy link
Author

I use => ImageStreamCompleter load(UiImageProvider key,DecoderCallback callback)
replace => ImageStreamCompleter loadImage(UiImageProvider key, ImageDecoderCallback decode)
then it works

@deakjahn
Copy link
Owner

deakjahn commented Jul 24, 2023

You probably use a very old Flutter SDK then. The old approach before ImageDecoderCallback was deprecated in 3.7.0. We're at 3.10.6 now. Please, upgrade it -- as any other actively maintained package or plugin, we follow the development and changes of the Flutter SDK, too.

@MargaretLHP
Copy link
Author

=>
Flutter 3.7.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 62bd79521d (4 months ago) • 2023-03-30 10:59:36 -0700
Engine • revision ec975089ac
Tools • Dart 2.19.6 • DevTools 2.20.1

@deakjahn
Copy link
Owner

deakjahn commented Jul 25, 2023

Yes, that's a problem. We're at 3.10 now, not 3.7. You haven't upgraded your Flutter for quite some time -- four months, actually, as it shows.

@Musaddiq625
Copy link
Contributor

Musaddiq625 commented Aug 16, 2023

Ive fixed this @deakjahn
can you please accept this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants