hex static method
Implementation
static String hex(
Object? value, {
int limit = maxValueBytes,
bool empty = true,
}) {
if (value is! String ||
value.length > limit * 2 ||
(!empty && value.isEmpty) ||
!RegExp(r'^(?:[0-9a-fA-F]{2})*$').hasMatch(value)) {
throw const FormatException(
'Expected bounded, even-length BLE hex data.',
);
}
return value.toLowerCase();
}