hasPrimaryDevice method
Does this protocol have a primary device with role name roleName
?
Implementation
bool hasPrimaryDevice(String roleName) =>
primaryDevices
.firstWhere(
(device) => device.roleName == roleName,
orElse: () => PrimaryDeviceConfiguration(roleName: 'not_found'),
)
.roleName !=
'not_found';