fromJson static method

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

Implementation

static NotificationGroupType? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case NotificationGroupTypeCalls.constructor:
      return NotificationGroupTypeCalls.fromJson(json);

    case NotificationGroupTypeMentions.constructor:
      return NotificationGroupTypeMentions.fromJson(json);

    case NotificationGroupTypeMessages.constructor:
      return NotificationGroupTypeMessages.fromJson(json);

    case NotificationGroupTypeSecretChat.constructor:
      return NotificationGroupTypeSecretChat.fromJson(json);

    default:
      return null;
  }
}