formatArrayBuffer function

String formatArrayBuffer(
  1. Uint8List data
)

Implementation

String formatArrayBuffer(Uint8List data) {
  // Uint8Array.map only supports returning another Uint8Array?
  var str = "";
  data.forEach((val) {
    var pad = val < 16 ? "0" : "";
    str += "0x$pad${val.toString()} ";
  });

  // Trim of trailing space.
  return str.substring(0, str.length - 1);
}