handleTransferException static method
String
handleTransferException(
- dynamic exception
)
Implementation
static String handleTransferException(dynamic exception) {
if (exception is SocketException) {
return 'No Internet connection. Please check your connection and try again.';
} else if (exception is HttpException) {
return 'Could not find the resource. Please try again.';
} else if (exception is FormatException) {
return 'Bad response format. Please contact support.';
} else {
return 'Something went wrong. Please try again later.';
}
}