Dio v.4.x.x not catching SocketException (no internet connection)

Viewed 1064

Since I updated dio package v.4.0.0 the lib not handling no internet connection anymore. The code here generate an exception inside dio_mixin.dart that not created a DioError exception inside my catch

My code:

try {

  var response = await dio.get('/children/${babyId.value}');

} on DioError catch (e) {
  print(e.response);
}

dio_mixin.dart code:

try {

  ...

} catch (e) {
      throw assureDioError(e, reqOpt);
}
0 Answers
Related