ub3lal 1 mēnesi atpakaļ
vecāks
revīzija
abfec7ace3
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      lib/src/http_request.dart

+ 6 - 0
lib/src/http_request.dart

@@ -65,7 +65,13 @@ class HttpGetImage {
         response = await http
             .get(Uri.parse(url), headers: headers)
             .timeout(Duration(seconds: time));
+
         if (response.statusCode == 200) {
+          if (response.body.isNotEmpty) {
+            sendPort.send(null);
+            break;
+          }
+
           sendPort.send(response.bodyBytes);
           break;
         }