ub3lal 1 месяц назад
Родитель
Сommit
abfec7ace3
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      lib/src/http_request.dart

+ 6 - 0
lib/src/http_request.dart

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