toBytes method

Uint8List toBytes()

Creates a Uint8List from an IcoHeader.

Implementation

Uint8List toBytes() {
  final bytes = ByteData(headerSize)
    ..setUint16(0, reserved, Endian.little)
    ..setUint16(2, imageType, Endian.little)
    ..setUint16(4, imageCount, Endian.little);
  return bytes.buffer.asUint8List();
}