bytes function

Generator<Uint8List> bytes({
  1. int minLength = 0,
  2. int? maxLength,
})

Generates byte strings of minLength to maxLength bytes.

Bytes rather than "binary", which is what the rest of the family calls these: Dart's own vocabulary is BytesBuilder, utf8.encode, and a Uint8List full of them. A null maxLength leaves the length to the engine, which keeps it small on its own.

Values shrink toward the empty string, and toward zero bytes within it.

Implementation

Generator<Uint8List> bytes({int minLength = 0, int? maxLength}) {
  _checkLengths(minLength, maxLength);
  return _BytesGenerator(minLength, maxLength);
}