toUint8List method

Uint8List? toUint8List(
  1. String? hexStr
)

Implementation

Uint8List? toUint8List(String? hexStr){
  if(hexStr == null){
    return null;
  }
  List<int> data = [];
  final length = hexStr.length;
  for(int i= 0;i<length/2;i++){
    final String str =  hexStr.substring(0+i*2,2+i*2);
    data.add(_hexTwoStrToInt(str));
  }
  return Uint8List.fromList(data);
}