isTimeoutException function
Helper function to determine if an exception is a timeout-related error.
This examines the exception and its string representation to determine if it represents a timeout condition.
Implementation
bool isTimeoutException(Object exception) {
final errorString = exception.toString().toLowerCase();
return errorString.contains('timeout') ||
errorString.contains('timed out') ||
errorString.contains('timeoutexception');
}