Tauseef-Hilal / WhatsUp

The ultimate mobile chat app. This project brings you the closest experience to WhatsApp, crafted with the power of Flutter and Firebase. With features like real-time conversations, efficient media transmission, voice messaging, and robust security, we've recreated the essence of WhatsApp while adding our unique touch.
https://github.com/Tauseef-Hilal/whatsapp_clone
MIT License
73 stars 23 forks source link

Deprecated call #5

Closed jowolf closed 9 months ago

jowolf commented 9 months ago

Build (flutter run) error:

ERROR: ../.pub-cache/hosted/pub.dev/photo_manager-2.7.1/lib/src/internal/image_provider.dart:68:5: Error: Type 'DecoderCallback' not found. ERROR: DecoderCallback decode, // ignore: deprecated_member_use ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/photo_manager-2.7.1/lib/src/internal/image_provider.dart:93:5: Error: Type 'DecoderCallback' not found. ERROR: DecoderCallback decode, // ignore: deprecated_member_use ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/photo_manager-2.7.1/lib/src/internal/image_provider.dart:68:5: Error: 'DecoderCallback' isn't a type. ERROR: DecoderCallback decode, // ignore: deprecated_member_use ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/photo_manager-2.7.1/lib/src/internal/image_provider.dart:93:5: Error: 'DecoderCallback' isn't a type. ERROR: DecoderCallback decode, // ignore: deprecated_member_use ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/cached_network_image-3.2.3/lib/src/image_provider/cached_network_image_provider.dart:78:54: Error: Type 'DecoderCallback' not found. ERROR: image_provider.CachedNetworkImageProvider key, DecoderCallback decode) { ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/cached_network_image-3.2.3/lib/src/image_provider/cached_network_image_provider.dart:99:5: Error: Type 'DecoderCallback' not found. ERROR: DecoderCallback decode, ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/cached_network_image-3.2.3/lib/src/image_provider/cached_network_image_provider.dart:78:54: Error: 'DecoderCallback' isn't a type. ERROR: image_provider.CachedNetworkImageProvider key, DecoderCallback decode) { ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/cached_network_image-3.2.3/lib/src/image_provider/cached_network_image_provider.dart:99:5: Error: 'DecoderCallback' isn't a type. ERROR: DecoderCallback decode, ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/cached_network_image-3.2.3/lib/src/image_provider/_image_loader.dart:25:5: Error: Type 'DecoderCallback' not found. ERROR: DecoderCallback decode, ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/cached_network_image-3.2.3/lib/src/image_provider/_image_loader.dart:25:5: Error: 'DecoderCallback' isn't a type. ERROR: DecoderCallback decode, ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/cached_network_image_platform_interface-2.0.0/lib/cached_network_image_platform_interface.dart:29:5: Error: Type 'DecoderCallback' not found. ERROR: DecoderCallback decode, ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/cached_network_image_platform_interface-2.0.0/lib/cached_network_image_platform_interface.dart:29:5: Error: 'DecoderCallback' isn't a type. ERROR: DecoderCallback decode, ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/flutter_blurhash-0.7.0/lib/src/blurhash_image.dart:32:48: Error: Type 'DecoderCallback' not found. ERROR: ImageStreamCompleter load(BlurHashImage key, DecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key)); ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/flutter_blurhash-0.7.0/lib/src/blurhash_image.dart:32:48: Error: 'DecoderCallback' isn't a type. ERROR: ImageStreamCompleter load(BlurHashImage key, DecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key)); ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/flutter_blurhash-0.7.0/lib/src/blurhash_widget.dart:218:42: Error: Type 'DecoderCallback' not found. ERROR: ImageStreamCompleter load(UiImage key, DecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key)); ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/flutter_blurhash-0.7.0/lib/src/blurhash_widget.dart:218:42: Error: 'DecoderCallback' isn't a type. ERROR: ImageStreamCompleter load(UiImage key, DecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key)); ERROR: ^^^^^^^^^^^^^^^ ERROR: Target kernel_snapshot failed: Exception

jowolf commented 9 months ago

I got it down to 4 errors, all in photo_manager, after upgdating the dependencies:

joe@lapstudio:~/WhatsUp$ flutter build linux

ERROR: ../.pub-cache/hosted/pub.dev/photo_manager-2.8.1/lib/src/internal/image_provider.dart:71:5: Error: Type 'DecoderCallback' not found. ERROR: DecoderCallback decode, // ignore: deprecated_member_use ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/photo_manager-2.8.1/lib/src/internal/image_provider.dart:96:5: Error: Type 'DecoderCallback' not found. ERROR: DecoderCallback decode, // ignore: deprecated_member_use ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/photo_manager-2.8.1/lib/src/internal/image_provider.dart:71:5: Error: 'DecoderCallback' isn't a type. ERROR: DecoderCallback decode, // ignore: deprecated_member_use ERROR: ^^^^^^^^^^^^^^^ ERROR: ../.pub-cache/hosted/pub.dev/photo_manager-2.8.1/lib/src/internal/image_provider.dart:96:5: Error: 'DecoderCallback' isn't a type. ERROR: DecoderCallback decode, // ignore: deprecated_member_use ERROR: ^^^^^^^^^^^^^^^ ERROR: Target kernel_snapshot failed: Exception Building Linux application...
Build process failed

Tauseef-Hilal commented 9 months ago

It seems to be an issue with the plugin photo_manager. Using the pre-release version solves the problem.

Update photo_manager version in pubspec.yaml:

...
dependencies:
  ...
  photo_manager: ^3.0.0-dev.2
  ...

You might also need to set compileSdkVersion to 34. Thanks for opening this issue!

Btw, I'm kinda busy with college so I'm not working on this at the moment. But feel free to open new issues if you encounter any. There is a lot of deprecated code in this project. Will fix it all once I get back to this.