getUserFriendlyMsg function
returns a user friendly message based on the code
.
PARAMS
code
- an int representing the code from the response body
This is used
Implementation
String getUserFriendlyMsg(int code) {
switch (code) {
case 0:
return checkConnectionText;
case 4:
return userPhoneExistsText;
case 5:
return userEmailExistsText;
case 6:
return usernameExistsText;
case 7:
case 10:
return noUserFoundText;
case 8:
return wrongCredentialsText;
case 9:
return noPINFoundText;
case 2:
case 3:
case 11:
default:
return contactSupport(kBewellSupportPhoneNumber);
}
}