FormResponse.fromJson constructor

FormResponse.fromJson(
  1. Map json_
)

Implementation

FormResponse.fromJson(core.Map json_)
    : this(
        answers: json_.containsKey('answers')
            ? (json_['answers'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  Answer.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        formId: json_.containsKey('formId')
            ? json_['formId'] as core.String
            : null,
        lastSubmittedTime: json_.containsKey('lastSubmittedTime')
            ? json_['lastSubmittedTime'] as core.String
            : null,
        respondentEmail: json_.containsKey('respondentEmail')
            ? json_['respondentEmail'] as core.String
            : null,
        responseId: json_.containsKey('responseId')
            ? json_['responseId'] as core.String
            : null,
        totalScore: json_.containsKey('totalScore')
            ? (json_['totalScore'] as core.num).toDouble()
            : null,
      );