hasPrimaryDevice method

bool hasPrimaryDevice(
  1. String roleName
)
inherited

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';