pack static method

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

This function packs the data to the request format

Implementation

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