isConnectionError property

bool get isConnectionError

Checks if the error is a connection error (specific to Dio exceptions).

Implementation

bool get isConnectionError =>
    (exception is DioException) &&
    (exception as DioException).type == DioExceptionType.connectionError;