toString method
Returns a string representation of this byte array.
Implementation
@override
String toString() {
if (_bytes.every((b) => b >= 32 && b <= 126)) {
// If all bytes are printable ASCII, show as string
return 'ByteArray("${toStringAsChars()}")';
} else {
// Otherwise show as hex
return 'ByteArray([${toHexString(' ')}])';
}
}