CourseWork.fromJson constructor

CourseWork.fromJson(
  1. Map json_
)

Implementation

CourseWork.fromJson(core.Map json_)
    : this(
        alternateLink: json_.containsKey('alternateLink')
            ? json_['alternateLink'] as core.String
            : null,
        assigneeMode: json_.containsKey('assigneeMode')
            ? json_['assigneeMode'] as core.String
            : null,
        assignment: json_.containsKey('assignment')
            ? Assignment.fromJson(
                json_['assignment'] as core.Map<core.String, core.dynamic>)
            : null,
        associatedWithDeveloper: json_.containsKey('associatedWithDeveloper')
            ? json_['associatedWithDeveloper'] as core.bool
            : null,
        courseId: json_.containsKey('courseId')
            ? json_['courseId'] as core.String
            : null,
        creationTime: json_.containsKey('creationTime')
            ? json_['creationTime'] as core.String
            : null,
        creatorUserId: json_.containsKey('creatorUserId')
            ? json_['creatorUserId'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        dueDate: json_.containsKey('dueDate')
            ? Date.fromJson(
                json_['dueDate'] as core.Map<core.String, core.dynamic>)
            : null,
        dueTime: json_.containsKey('dueTime')
            ? TimeOfDay.fromJson(
                json_['dueTime'] as core.Map<core.String, core.dynamic>)
            : null,
        gradeCategory: json_.containsKey('gradeCategory')
            ? GradeCategory.fromJson(
                json_['gradeCategory'] as core.Map<core.String, core.dynamic>)
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        individualStudentsOptions:
            json_.containsKey('individualStudentsOptions')
                ? IndividualStudentsOptions.fromJson(
                    json_['individualStudentsOptions']
                        as core.Map<core.String, core.dynamic>)
                : null,
        materials: json_.containsKey('materials')
            ? (json_['materials'] as core.List)
                .map((value) => Material.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        maxPoints: json_.containsKey('maxPoints')
            ? (json_['maxPoints'] as core.num).toDouble()
            : null,
        multipleChoiceQuestion: json_.containsKey('multipleChoiceQuestion')
            ? MultipleChoiceQuestion.fromJson(json_['multipleChoiceQuestion']
                as core.Map<core.String, core.dynamic>)
            : null,
        scheduledTime: json_.containsKey('scheduledTime')
            ? json_['scheduledTime'] as core.String
            : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
        submissionModificationMode:
            json_.containsKey('submissionModificationMode')
                ? json_['submissionModificationMode'] as core.String
                : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
        topicId: json_.containsKey('topicId')
            ? json_['topicId'] as core.String
            : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
        workType: json_.containsKey('workType')
            ? json_['workType'] as core.String
            : null,
      );