RoleActor.fromJson constructor

RoleActor.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory RoleActor.fromJson(Map<String, Object?> json) {
  return RoleActor(
    actorGroup: json[r'actorGroup'] != null
        ? ProjectRoleGroup.fromJson(
            json[r'actorGroup']! as Map<String, Object?>)
        : null,
    actorUser: json[r'actorUser'] != null
        ? ProjectRoleUser.fromJson(
            json[r'actorUser']! as Map<String, Object?>)
        : null,
    avatarUrl: json[r'avatarUrl'] as String?,
    displayName: json[r'displayName'] as String?,
    id: (json[r'id'] as num?)?.toInt(),
    name: json[r'name'] as String?,
    type: json[r'type'] != null
        ? RoleActorType.fromValue(json[r'type']! as String)
        : null,
  );
}