isValidAssignment method

bool isValidAssignment(
  1. AssignedTo assignment
)
inherited

Determines whether all participant roles in assignment are part of the participantRoles in this protocol.

Implementation

bool isValidAssignment(AssignedTo assignment) {
  if (assignment.isAssignedToAll) return true; // assigned to all

  for (var name in assignment.roleNames!) {
    for (var role in participantRoles!) {
      if (role.role == name) return true;
    }
  }
  return false;
}