getTitle function

String getTitle(
  1. Object exception
)

Implementation

String getTitle(Object exception) {
  if (exception is ApiException && exception.type == ApiExceptionType.offline) {
    return "No Internet Connection";
  }
  if (exception is ApiException && exception.type == ApiExceptionType.offline) {
    return "Bad Response";
  }
  return "Something went wrong";
}