parseMessage method
Implementation
MessagePayload parseMessage(dynamic data) {
try {
return MessagePayload.fromJson(json.decode(data));
} catch (error) {
return MessagePayload(type: 'unknown');
}
}
MessagePayload parseMessage(dynamic data) {
try {
return MessagePayload.fromJson(json.decode(data));
} catch (error) {
return MessagePayload(type: 'unknown');
}
}