Flutter_cached_network_image: application crashes when image url returns 404

Created on 28 Apr 2019  路  10Comments  路  Source: Baseflow/flutter_cached_network_image

When i try to load an image using the library sometimes the image may not be available the application then crashes even thought i used errorWidget in the constructor.
here is my example:

 CachedNetworkImage(
                    imageUrl: userPayload.photo,
                    width: 90,
                    height: 90,
                    placeholder: (context, url) {
                      return DefaultUserAvatarWidget();
                    },
                    errorWidget: (context, url, error) {
                      return DefaultUserAvatarWidget();
                    },
                  )

error:
HttpException (HttpException: No valid statuscode. Statuscode was 404)

Most helpful comment

@renefloor still happening in 1.1.1.

All 10 comments

Same happens for me.

same here

X 4

Same for me.
Capture

+1

+1

same here

Is this a duplicate of #144 (fix in #190)?

Fixed

@renefloor still happening in 1.1.1.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gunhansancar picture gunhansancar  路  3Comments

ivk1800 picture ivk1800  路  7Comments

sososdk picture sososdk  路  5Comments

nashfive picture nashfive  路  5Comments

port3000 picture port3000  路  5Comments