getUnKnownMes method

dynamic getUnKnownMes(
  1. dynamic error
)

Implementation

getUnKnownMes(dynamic error) {
  if (error['msg'] != null) {
    errorResponse.message = error['msg'].toString();
  } else if (error['message'] != null) {
    errorResponse.message = error['message'].toString();
  } else {
    errorResponse.message = "Something went wrong";
  }
  return errorResponse;
}