I want to make ArrayBuffer from an Integer like this Javascript code below :
const hexEncoded = "76e7480b836359dfa28aa59bccf11e824717a2ae9ea5e09947753b6fecf0d3cd";
const arrBuf = new ArrayBuffer(hexEncoded.length/2);
console.log("arrBuf ",arrBuf);
it will print out like this image below arrBuf output
i have trying to using Uint8List in Dart, like:
var arrBuf = Uint8List((hexEncodedData.length / 2).ceil());
print("arrBuf ${arrBuf}");
and it just print out like this
arrBuf [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
how can i achive like that js output for ArrayBuffer ?