fromJson method
Implementation
@override
USubscribeLabelsMessage fromJson(Map<String, dynamic> json) {
try {
if (isLabels(json)) {
return USubscribeLabelsMessage.labels(
data: const LabelsConverter().fromJson(json),
);
}
if (isInfo(json)) {
return USubscribeLabelsMessage.info(
data: const InfoConverter().fromJson(json),
);
}
return USubscribeLabelsMessage.unknown(data: json);
} catch (_) {
return USubscribeLabelsMessage.unknown(data: json);
}
}