InputStream constructor Null safety

InputStream(
  1. dynamic data,
  2. {int byteOrder = LITTLE_ENDIAN,
  3. int start = 0,
  4. int? length}
)

Create a InputStream for reading from a List

Implementation

InputStream(dynamic data,
    {this.byteOrder = LITTLE_ENDIAN, this.start = 0, int? length})
    : buffer = data is TypedData
          ? Uint8List.view(
              data.buffer, data.offsetInBytes, data.lengthInBytes)
          : data is List<int>
              ? data
              : List<int>.from(data as Iterable<dynamic>),
      offset = start {
  _length = length ?? buffer.length;
}