byteToInt8 static method

int byteToInt8(
  1. int b
)

Convert a byte length int value to an int value, for example a byte of 00000010 -> 2

Implementation

static int byteToInt8(int b) =>
    Uint8List.fromList([b]).buffer.asByteData().getInt8(0);