ub3lal hace 1 mes
padre
commit
d21151f0f9
Se han modificado 1 ficheros con 6 adiciones y 4 borrados
  1. 6 4
      lib/src/http_request.dart

+ 6 - 4
lib/src/http_request.dart

@@ -67,10 +67,12 @@ class HttpGetImage {
             .timeout(Duration(seconds: time));
 
         if (response.statusCode == 200) {
-          if (response.body.isNotEmpty) {
-            sendPort.send(null);
-            break;
-          }
+          try {
+            if (response.body.isNotEmpty) {
+              sendPort.send(null);
+              break;
+            }
+          } catch (e) {}
 
           sendPort.send(response.bodyBytes);
           break;