NotificationGroupType.fromJson constructor

NotificationGroupType.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory NotificationGroupType.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case NotificationGroupTypeMessages.CONSTRUCTOR:
      return NotificationGroupTypeMessages.fromJson(json);
    case NotificationGroupTypeMentions.CONSTRUCTOR:
      return NotificationGroupTypeMentions.fromJson(json);
    case NotificationGroupTypeSecretChat.CONSTRUCTOR:
      return NotificationGroupTypeSecretChat.fromJson(json);
    case NotificationGroupTypeCalls.CONSTRUCTOR:
      return NotificationGroupTypeCalls.fromJson(json);
    default:
      return const NotificationGroupType();
  }
}