unpack static method

int unpack(
  1. String format,
  2. Uint8List value
)

This function unpacks the data to the requested format

Implementation

static int unpack(String format,Uint8List value){
  if(format == '<I'){
    return value.buffer.asInt32List()[0];
  }
  else if(format == '<b'){
    return value.buffer.asInt8List()[0];
  }
  else{
    throw('here');
  }
}