getLastMessageStatus function
A function that returns the status of the last message.
Implementation
String? getLastMessageStatus(dynamic status) {
if (status == null) {
return null;
}
if (Platform.isAndroid) {
return status;
} else {
switch (status) {
case 2:
return "A"; //acknowledge
case 3:
return "D"; //delivered
case 4:
return "S"; //seen
case 5:
return "R"; //received
default:
return "N"; //"N" for "notAcknowledged" in iOS,
}
}
}