NotificationType.fromJson constructor
a NotificationType return type can be :
Implementation
factory NotificationType.fromJson(Map<String, dynamic> json) {
switch(json["@type"]) {
case NotificationTypeNewMessage.CONSTRUCTOR:
return NotificationTypeNewMessage.fromJson(json);
case NotificationTypeNewSecretChat.CONSTRUCTOR:
return NotificationTypeNewSecretChat.fromJson(json);
case NotificationTypeNewCall.CONSTRUCTOR:
return NotificationTypeNewCall.fromJson(json);
case NotificationTypeNewPushMessage.CONSTRUCTOR:
return NotificationTypeNewPushMessage.fromJson(json);
default:
return const NotificationType();
}
}