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

DecoderBufferCallback is deprecated and DecoderCallback removed #861

Merged
merged 8 commits into from
Sep 25, 2023

Conversation

Carapacik
Copy link
Contributor

@Carapacik Carapacik commented Jul 23, 2023

✨ What kind of change does this PR introduce? (Bug fix)

Add loadImage instead loadBuffer deprecation

πŸ’₯ Does this PR introduce a breaking change? Yes

Merge this PR after this
#845

πŸ“ Links to relevant issues/docs

(Flutter Docs)
https://api.flutter.dev/flutter/painting/DecoderBufferCallback.html
https://api.flutter.dev/flutter/painting/ImageDecoderCallback.html

PR(Remove ImageProvider.load, DecoderCallback and PaintingBinding.instantiateImageCodec)
flutter/flutter#132679
flutter/flutter#133171

Checklist before submitting

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated
  • Rebased onto current develop

@Carapacik Carapacik changed the title Deprecate `DecoderBufferCallback' is deprecated Jul 23, 2023
@gauravmehta13
Copy link

@Carapacik Can you please remove `DecoderBuffer' instead of deprecating it in another branch, since its removed on master

@Carapacik Carapacik changed the title `DecoderBufferCallback' is deprecated DecoderBufferCallback is deprecated and DecoderCallback removed Aug 27, 2023
Copy link
Contributor

@renefloor renefloor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the thorough cleanup of all the code. Looks pretty good in general, but I also have to give it a good test to see if nothing breaks, because it is a big PR. I already added some comments and questions for potential improvements. I'll do my best to merge this PR quick. I've been on holiday for a couple of weeks, so I'm pickup up my slack.

@codecov
Copy link

codecov bot commented Sep 15, 2023

contactjavas added a commit to tentram/flutter_cached_network_image that referenced this pull request Sep 18, 2023
@Carapacik
Copy link
Contributor Author

@renefloor

@M1chlCZ
Copy link

M1chlCZ commented Sep 23, 2023

I think there is a problem with octo_image dependency, which has blurhash_flutter dependency which still has that DecoderCallback

Here is the bug:

../../.pub-cache/hosted/pub.dev/flutter_blurhash-0.7.0/lib/src/blurhash_image.dart:32:48: Error: 'DecoderCallback' isn't a type.
  ImageStreamCompleter load(BlurHashImage key, DecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key))

And this is how I am using CachedNetworkImage in pubspec.yaml

  cached_network_image:
    git:
      url: https://github.com/Carapacik/flutter_cached_network_image.git
      path: cached_network_image

Flutter SDK 3.15 beta

@renefloor
Copy link
Contributor

I think there is a problem with octo_image dependency, which has blurhash_flutter dependency which still has that DecoderCallback

Here is the bug:

../../.pub-cache/hosted/pub.dev/flutter_blurhash-0.7.0/lib/src/blurhash_image.dart:32:48: Error: 'DecoderCallback' isn't a type.
  ImageStreamCompleter load(BlurHashImage key, DecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key))

And this is how I am using CachedNetworkImage in pubspec.yaml

  cached_network_image:
    git:
      url: https://github.com/Carapacik/flutter_cached_network_image.git
      path: cached_network_image

Flutter SDK 3.15 beta

Thanks for the notice. I'll remove the dependency on blurhash from octo_image and write in the docs how to add it manually if you need it.

@renefloor
Copy link
Contributor

Thanks a lot for all the effort!

@renefloor renefloor merged commit a0ce50a into Baseflow:develop Sep 25, 2023
15 of 17 checks passed
@renefloor
Copy link
Contributor

@M1chlCZ Baseflow/octo_image#30

@Carapacik
Copy link
Contributor Author

@renefloor I think also need to update

@renefloor
Copy link
Contributor

Yes, I'll release octo_image first (probably today) and directly after cached_network_image with updated pubspec

@Carapacik Carapacik deleted the deprecate branch September 25, 2023 14:04
@renefloor
Copy link
Contributor

Released as 3.3.0: https://pub.dev/packages/cached_network_image/changelog

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

Successfully merging this pull request may close these issues.

4 participants