alertInfo property
AlertInfo
get
alertInfo
Retrieves the alert information based on the exception type.
This method maps the type of exception to a user-friendly title and message that can be displayed as an alert to the user.
Implementation
AlertInfo get alertInfo {
String alertTitle;
String msg;
switch (type) {
case ExceptionType.noInternet:
alertTitle = ApiErrorMessage.noInternet;
msg = ApiErrorMessage.noInternetMessage;
break;
// ... other cases ...
default:
alertTitle = ApiErrorMessage.defaultErrorTitle;
msg = ApiErrorMessage.somethingWentWrong;
}
return AlertInfo(title: alertTitle, message: msg);
}