UserProfile.fromJson constructor

UserProfile.fromJson(
  1. Map json_
)

Implementation

UserProfile.fromJson(core.Map json_)
    : this(
        emailAddress: json_.containsKey('emailAddress')
            ? json_['emailAddress'] as core.String
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        name: json_.containsKey('name')
            ? Name.fromJson(
                json_['name'] as core.Map<core.String, core.dynamic>)
            : null,
        permissions: json_.containsKey('permissions')
            ? (json_['permissions'] as core.List)
                .map((value) => GlobalPermission.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        photoUrl: json_.containsKey('photoUrl')
            ? json_['photoUrl'] as core.String
            : null,
        verifiedTeacher: json_.containsKey('verifiedTeacher')
            ? json_['verifiedTeacher'] as core.bool
            : null,
      );