GetSocialActivity.fromJSON constructor

GetSocialActivity.fromJSON(
  1. Map<String, dynamic> json
)

Implementation

GetSocialActivity.fromJSON(Map<String, dynamic> json)
    : id = json['id'],
      text = json['text'],
      author = User.fromJSON(json['author']),
      attachments = Utils.createList(json['attachments'],
          (jsonMap) => MediaAttachment.fromJSON(jsonMap)),
      button = json['button'] == null
          ? null
          : ActivityButton.fromJSON(json['button']),
      type = json['type'],
      isAnnouncement = json['announcement'],
      commentsCount = json['commentsCount'],
      reactionsCount = Utils.createStringIntMap(json['reactionsCount']),
      myReactions = Utils.createStringList(json['myReactions']),
      reactions = Utils.createList(
          json['reactions'], (jsonMap) => UserReactions.fromJSON(jsonMap)),
      commenters = Utils.createList(
          json['commenters'], (jsonMap) => User.fromJSON(jsonMap)),
      properties = Utils.createStringStringMap(json['properties']),
      labels = Utils.createStringList(json['labels']),
      createdAt = json['createdAt'],
      mentions = Utils.createList(
          json['mentions'], (jsonMap) => Mention.fromJSON(jsonMap)),
      source = CommunitiesEntity.fromJSON(json['source']),
      status = json['status'],
      poll = json['poll'] == null ? null : Poll.fromJSON(json['poll']),
      popularity =
          json['popularity'] == null ? 0 : json['popularity'].toDouble(),
      isBookmarked = json['isBookmarked'],
      bookmarksCount = json['bookmarksCount'];