Question.fromJson constructor

Question.fromJson(
  1. Map json_
)

Implementation

Question.fromJson(core.Map json_)
    : this(
        author: json_.containsKey('author')
            ? Author.fromJson(
                json_['author'] as core.Map<core.String, core.dynamic>)
            : null,
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        text: json_.containsKey('text') ? json_['text'] as core.String : null,
        topAnswers: json_.containsKey('topAnswers')
            ? (json_['topAnswers'] as core.List)
                .map((value) => Answer.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        totalAnswerCount: json_.containsKey('totalAnswerCount')
            ? json_['totalAnswerCount'] as core.int
            : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
        upvoteCount: json_.containsKey('upvoteCount')
            ? json_['upvoteCount'] as core.int
            : null,
      );