RawPFile.ofBytes constructor

RawPFile.ofBytes(
  1. String? name,
  2. Uint8List bytes
)

Implementation

RawPFile.ofBytes(String? name, Uint8List bytes)
    : _isRead = true,
      path = null,
      _bytes = bytes,
      name = name ?? puid(),
      _read = SafeCompleter.stopped(),
      _readStreamFactory =
          ((_) => Stream.fromIterable((_ as RawPFile)._bytes!).chunked(1024)),
      _size = bytes.length;