fromJson static method

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

Implementation

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

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

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

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

    default:
      return null;
  }
}