fromJson static method
Inherited by: NotificationTypeNewCall NotificationTypeNewMessage NotificationTypeNewPushMessage NotificationTypeNewSecretChat
Implementation
static NotificationType? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
switch (json['@type']) {
case NotificationTypeNewCall.constructor:
return NotificationTypeNewCall.fromJson(json);
case NotificationTypeNewMessage.constructor:
return NotificationTypeNewMessage.fromJson(json);
case NotificationTypeNewPushMessage.constructor:
return NotificationTypeNewPushMessage.fromJson(json);
case NotificationTypeNewSecretChat.constructor:
return NotificationTypeNewSecretChat.fromJson(json);
default:
return null;
}
}