ScanProfile constructor
ScanProfile({})
Creates and validates a scan profile.
Implementation
ScanProfile({
required this.id,
this.serviceUuids = const [],
this.namePrefixes = const [],
this.manufacturerIds = const [],
this.signatureVerification,
}) {
if (id.trim().isEmpty) {
throw ArgumentError.value(id, 'id', 'must not be empty');
}
for (final uuid in serviceUuids) {
if (!_validUuid.hasMatch(uuid)) {
throw ArgumentError.value(
uuid,
'serviceUuids',
'invalid Bluetooth UUID',
);
}
}
}