here when i try to catch the error when i try to use the request without internet i can not catch the error for dealing with thim.
var httpClient = HTTP.Client();
var request = HTTP.Request("GET", Uri.parse(url));
request.headers.addAll({'Range': 'bytes=$downloadFrom-$downloadUntil'});
var response;
try{
response = httpClient.send(request).catchError((error){ throw error;});
}catch(e){
print("----> " + e.toString());
}