Topic.fromJSON constructor

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

Implementation

Topic.fromJSON(Map<String, dynamic> json)
    : id = json['id'],
      title = json['title'],
      topicDescription = json['description'],
      avatarUrl = json['avatarUrl'],
      createdAt = json['createdAt'],
      updatedAt = json['updatedAt'],
      settings = CommunitiesSettings.fromJSON(json['settings']),
      followersCount = json['followersCount'],
      isFollowedByMe = json['isFollowedByMe'],
      popularity =
          json['popularity'] == null ? 0 : json['popularity'].toDouble();