isBinaryContent function

bool isBinaryContent(
  1. List<int> bytes
)

Helper to detect if a byte array represents binary content.

Binds: FR-105.

Implementation

bool isBinaryContent(List<int> bytes) {
  for (final b in bytes) {
    if (b == 0) {
      return true;
    }
  }
  return false;
}