getInt8 method

int getInt8(
  1. int offset
)

Reads 1-byte as a signed integer.

The offset must satisy the relations 0offsetoffset+1this.length.

final Buffer buffer = Buffer.fromList([-1]);
final int value = buffer.getInt8(0);
print(value); // -1

Implementation

int getInt8(final int offset) {
  return asByteData().getInt8(offset);
}