The following HandshakeException was thrown resolving an image codec: Connection terminated during handshake

163 views Asked by At

I want to display image from internet. This is the code:

ClipRRect(
                  borderRadius: BorderRadius.circular(20),
                  child: Image.network(
                    'url',
                  ),
                )

The error is:

======== Exception caught by image resource service ================================================
The following HandshakeException was thrown resolving an image codec:
Connection terminated during handshake

When the exception was thrown, this was the stack: 
#0      _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1020:15)
<asynchronous suspension>
#1      _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:923:9)
<asynchronous suspension>
#2      _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1044:13)
<asynchronous suspension>
Image provider: NetworkImage("url", scale: 1.0)
Image key: NetworkImage("url", scale: 1.0)
====================================================================================================

What do I do? Please help me.

0

There are 0 answers