fromJson static method

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

Implementation

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

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

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

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

    default:
      return null;
  }
}