getTitle function
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";
}