How to solve "Error: Type 'DecoderCallback' not found." to run a Flutter app locally on an iPhone?

449 Views Asked by At

When I try to run my Flutter app locally on my iPhone, I keep getting the error message: "Could not build the precompiled application for the device. Error (Xcode): ../../.puro/shared/pub_cache/hosted/pub.dev/cached_network_image-3.2.1/lib/src/image_provider/cached_network_image_provider.dart:76:54: Error: Type 'DecoderCallback' not found." Do I need to change something in my Podfile? Please help me run my app locally.

1

There are 1 best solutions below

1
arwaz shaikh On

Delete pods folder inside iOS folder. Edit pubspec.yaml file in root directory of project change version of cached_network_image to 3.3.0

Basically you need to use newer version instead of 3.2.1

Again do flutter build iOS, run app from from xcworkspace and clean build folder and do build and it again should work.